Driving Intelligent IoT Monitoring and Control through Cloud Computing and Machine Learning