Add links to type and function spec documentation

In order to keep most of the type linkify specific stuff from
making templates.ex much bigger than it was that has been split
into a separate file. This does create a recursive dependency,
but elixir/erlang doesn't seem to have a problem with that.