Better php support: interfaces, inheritance, namespaces

PHP support improvements, as evolution of #211.

//cc @isagalaev, @martindilling and @vassilevsky