replace the old `<template OverwriteFlag=.../>` lines in php templates

This patch replaces the current way of specifying the template settings with an XML tag like `<template OverwriteFlag=.../>` as the first line of PHP template files.
The new way is a pure PHP implementation, where the template simply sets a special variable like this:
```php
<?php
	global $_TEMPLATE_SETTINGS;
	$_TEMPLATE_SETTINGS = array(
		'OverwriteFlag' => false,
		'DocrootFlag' => false,
		'DirectorySuffix' => '',
		'TargetDirectory' => __MODEL__,
		'TargetFileName' => $objTypeTable->ClassName . '.class.php'
	);
?>
```