Add namespace-iterating to CM_Render::getLayoutPath()

Adds more flexibility to getLayoutPath(), mainly intended for extending 'abstract' templates. E.g. a page template in a namespace `Foo` which can dynamically extend an abstract template in a lower namespace `Bar` without having knowledge about it.