Make inheritance independent of type order

This updates the inheritance handling with code and test case to make it independent of the order types are declared in as suggested in wsdl2phpgenerator/wsdl2phpgenerator#80.