Better formatting code

This pull request improves our formatting code based on some great feedback from @kballard in #129. It:

 * switches urls so they appear in brackets
 * doesn't show the link label if the label is a substring of the URL (which is most links posted by people to slack)
 * correctly decodes entities in messages