Improve content-store test helpers.

* Allow stubs to take either a hash or a string containing JSON
* Add stub for content-store 404