Agent-Oriented Cooperative Smart Objects: From IoT System Design to Implementation