CRM-15534 - Fix api.getfields to return custom fields from sub-types
Api getfields code cleanup
Merge pull request #4476 from colemanw/CRM-15534

CRM-15534 - Fix api.getfields to return custom fields from sub-types