Fix pre-loading of entities and entity_types when format is xml.

Also make JSON the default format for all endpoints.