Fixed multiple issues in template administration

Fixes #1247
Fixed last modification time of templates
Fixed template delete
Fixed template copy function
Fixed template copy function
Merge branch 'master' of github.com:WoltLab/WCF
Fixed small issue
Fixed memleak / infinite allocating loop in WCFSetup.class.php
Small style optimization
Merge pull request #1248 from Obbi89/master

Fix: Bug in package revert(from invalid package file) in WCFSetup
Small optimization
Merge branch 'master' of github.com:WoltLab/WCF