Add posthook for augmenting `_links` attribute to JSON output

This uses HAL to support HATEOAS. See http://stackoverflow.com/a/13381261/407954 for details.