more complete store API

* added delete
* handle locks when adding items
* initial implementation of query

query is incomplete - needs more tests