OmeroCpp: Miscellaneous fixes

- Correct a number of compiler warnings (bad syntax, casting, unused parameters, undeclared free functions)
- No functional changes

--------

Testing:
- jobs should remain green