Merge "API: Overhaul ApiResult, make format=xml not throw, and add json formatversion"