Fixes bug 1010353 - Middleware roles

this PR refactors the middleware so that the storage classes are not hard coded into the middleware_app itself.  The "prefix" system for associating services with implementations has been replaced with a "role" system instead.  Overrides are done by specifying the namespace in which an alternative implementation resides rather than the name of a implementation