Re-factored principally so that blocking operations can be managed. Caching is also provided for resource retrieval. Thanks also to Nilanjan Raychaudhuri for his contributions.

Spray's cache is now used in order to avoid any thundering herd issue, and also so that we don't just allocate memory in an unbounded manner. Previously data was being cached for each possible asset with no upper bound.