Making main fork compatible with PSR-0 autoloading

Adding support of support of PHP >= 5.3 namespaces, PSR-0 autoloading
and a couple of other basic improvements.