Mereged from 2.3 (1624-1626): TemplateLoader-related javadoc improvements (to address some frequent misunderstandings). (Plus some minor code cleanup.)