Fix pass by ref in object comparer and add tests

ObjectComparer wanted to pass things by reference
for some reason which fails PHP STRICT so this is
removed

Also added some simple tests for the class

Change-Id: I2653426355b99913d0a85be104545edbd5d379f6
(cherry picked from commit 875dc1c3863dfbb9ce6c49e3e0d486abe2d7c000)