Take advantage of the new ApiResult metadata to do the following:
- Change booleans to actual booleans, instead of present-as-empty-string for true and absent for false.
- Change {"key":{"*":"value"}} to {"key":"value"}
- Change things that are really key-value pairs to kvp: [{"name":"key1","*":"value1"},{"name":"key2","*":"value2"}] → {"key1":"value1","key2":"value2"}
- Note this doesn't apply if there are more than two properties, although we might still change it to an assoc instead of an array in that case.
- Change query's "pages" output to an 'BCarray' so it comes out as an array in the new format.
- Resolve T12887 by setting META_TYPE='assoc' where needed.