More 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.