Energy Efficient IoT Data Collection in Smart Cities Exploiting D2D Communications