Fix Error Prone ArrayEquals/ArrayHashCode bugs

This will change behavior so it could break tests but
if it does it is because they relied on broken behavior.

Someone on the frameworks team will need to verify the
correctness of these changes and fix any knock on effects.

See the following for a description of the bugs:
* http://errorprone.info/bugpattern/ArrayEquals
* http://errorprone.info/bugpattern/ArrayHashCode

Fixed automatically by Error Prone apart from manual
changes to fix up the formatting (Error Prone expects
google-java-format) and to change Object.deepEquals to
Arrays.equals for consistency with Arrays.hashCode.

Test: make checkbuild
Change-Id: I1528b795b77a4f1e0c4e7e66ad4f924b7a7606f6
1 file changed