(bug 44683) Implementing missing equals() and toJSON() methods

This change set implements some equals() and toJSON() methods for
wb.Reference, wb.Claim and wb.Statement not yet implemented but
required for implementing the setClaim API method.

- patch set 4: rebase
- patch set 6: Optimized QUnit tests

Change-Id: I0e1d341549e253bfb411bc61960bbd57ad569c84
Merge "(bug 44683) Implementing missing equals() and toJSON() methods"