Implemented the endpoints in terms of the storage module, so the
rest server doesn't need to have a clue if its requests are being
fulfilled locally or not.

Wrote the local fulfillment part of the storage methods, with promises
because I can't go back to no flow control.

More notes about upcoming work.