Doctrine conversion for publisher

Most functions moved to doctrine
Fixes to system module and core for issues discovered while testing
Some PSR-2 changes
Move to .tpl template names
Fix GPL links

More is needed, but this is a start
Additional conversions, fixes and updates.

The import routines have not been converted, but everything else should be off of legacy code. Added basic asset management, and other new standards.
Fix a few issues noted by scrutinizer
Some doc fixes suggested by scrutinizer
Merge pull request #150 from geekwright/publisher

Doctrine conversion for publisher