Improved exception handling when installing repositories on tool shed comm errors.

Now 5XX status will be set. More specific errors else where as well.
Break-up big function install_repository_revision in tool_shed_repositories API.
Refactor install_repository_revision - move all API formatting logic to end of function.
Refactor code actually orchistrating installs out of high-level API action.