api/v3 - Better support for entities defined by extensions

Note: The CRM_Core_DAO_AllCoreTables / hook_civicrm_entityTypes is derived from the previous conversations between @pdelbar and me. I copied/revised the outputs from that (which are in the sepa repo) but couldn't find the actual patch.