Spaces of Things: Application-Level Abstractions for the Internet of Things