Improve ApiQueryTestBase::assertResult

It really shouldn't be printing output in the middle of the phpunit
progress indicator; this output should be included in the final output
instead.

This rewrites the function to make use of PHPUnit's data structure
diffing support.

Bug: 57974
Change-Id: Ia4b66182922005da8e2bc173794d712492ad13fa
Merge "Improve ApiQueryTestBase::assertResult"