Move fr_canonicalize_error to log.c

I still don't like the name, partly because now I have to remember how to spell canonicalize, and it seems like it should have double n's to me
Convert the majority of tmpl functions to use a similar signature as the parse functions

This means condition parsing error markers now extend into attribute references