minor improvement using rsplit
remove use of StringIO from RiemannClient
fix bug
Use relative imports; rearrange imports
Fix imports; add flask g object and use it to manage riemann client
Move flask app to package __init__
move riemann client handling on flask g object to riemann_client module
Return app factory to server.py
helper for conditional registration of teardown handler
fix riemann_client use of flask.g to support app factory
cleanup
reorganize imports; cleanup some code to reduce boilerplate; use app-factory compatible setup on flask.g
fix teardown handler registration
cleanup; use correct get_blueprints_manager
fix
pep8
Merge branch 'develop' of https://github.com/CloudifySource/cosmo-manager into yb_misc

Conflicts:
	manager-rest/manager_rest/blueprints_manager.py
	manager-rest/manager_rest/es_storage_manager.py
	manager-rest/manager_rest/file_storage_manager.py
	manager-rest/manager_rest/resources.py
	manager-rest/manager_rest/storage_manager.py
Merge pull request #166 from yishaibeeri/yb_misc

Use Flask application context for resource management; misc