Added JavaDoc support for @return.
Attempt to generate cross-template JavaDoc links for constants. It suffers
from static initialization "deadlocks", so it's currently unused.