CPP unit test fixes (rebased onto dev_5_0)



This is the same as gh-2444 but rebased onto dev_5_0.

----

While testing @rleigh-dundee's work on breaking the `omero_client` library into multiple smaller libraries, I spent some time trying to get the unit tests passing (mostly around the comparison operators).

**Note:** the work here only corrected the comparison of non-collection `RTypes` in the general case. There are still issues, especially with `RMap`