Merge branch 'master' of https://github.com/cbhaley/calibre

Enforce global uniqueness across libraries for user defined template
function names, this will allow the sue of multiple libraries in the
same process.
Add loading of user template functions to the new backend
Fix problems creating template functions caused by the changes for the new single-name rule
Merge branch 'kovidgoyal/master'