Querying the IoT Using Multi-Resolution Contexts