Throw exception if $/2 is called

This goal should always be expanded at compile time.  If it survives
to actually be called, there's a serious problem somewhere.
compile_function/4 isn't exported

This was always a hack around PlDoc troubles.  Discussion on the
mailing list suggests that those troubles will be resolved soon, so
I'm removing the hack.
Remove comment that confused PlDoc

For some reason, having this single line comment before of/2
documentation confused PlDoc into thinking that of/2 was not
documented.  I'm guessing that the single line comment was considered
as part of the doc comment after it.
Move format_template/1 definition

Having the definition in its previous place caused documentation for
$/2 to be skipped.