Templated links

This adds the possibility to support templated links. See http://stateless.co/hal_specification.html 

This is based off PR, so it will have to be rebased. The commit in question is: ef6c3b3