IoT Applications in Agriculture for Improving Food Quality and Safety