Add logElementTreeJSON() and friends

array unique() and object getMethods
improve array and boolean assertion diagnostics
support options for screenCapture and json logging on test failure
logDeviceInfo()