Querying the IoT Using Multiresolution Contexts