Move the inheritance logic to XMLFile class. Revert RenderPath class.

- Fix the original XMLFile used in the inheritance from being patched in the resource cache.
- Support multi-level inheritance.
- Support for all classes that use XMLFile for loading.