Adjust Slack message format to match HipChat's

Also add some tests for formatting. See #586.