Move declaration of compareContents() outside of a function, to avoid fatals when the function is declared twice

See https://github.com/wp-cli/wp-cli/pull/398/files#r3869537
Skip checking these numeric fields, as they might change during the tests

See https://github.com/wp-cli/wp-cli/pull/398/files#r3869915
Simplify expression of the run with errors condition

See https://github.com/wp-cli/wp-cli/pull/398/files#r3869578