Better status information when a relation hook fails

The first commit makes a  bunch of changes which take advantage of new data now available in the FullStatus API response to show the remote endpoint details when a relation hook fails. This addresses LP #1194481.

The second commit refactors the status formatting code to make some of the changes made in the previous revision somewhat cleaner.
So the function name makes sense but reading the code I don't understand why it is being called in getUnitStatusInfo. Not sure if a docstring here would be nice or it is should be up in the caller.