This contains 2 commits that I just want to check on.
This cleanup is needed for the modifier UI patch where these functions are called from the panel_draw functions with const context.
- uiTemplateID: Straightforward, just const for the template and the functions it calls
- uiTemplateCacheFile: Had to create a function in rna_ui.c because the generated RNA callback doesn't have const context.