Major commit for #3810 - project templates
Fixes #3852 - make it so a virgin server doesn't crash if project
templates index file hasn't been created yet.
Fix UI logic bug in New Project dialog introduced when I added the "Use
project template" checkbox.
Fixes #3851 - various code cleanups and a few bug fixes along the way.
Fix bug in project templates server code where last commit compared
against empty string before checking for null
Merge branch '3810-ProjectTemplates-5'