Fix the GetDatabaseResource method to be backward compatible with 1.11.x
Fix the module_db_resource smarty resource to look in the (old) module_templates folder first, but if that fails to use the new CmsLayoutAPI.