Add wrap() and unwrap() methods to rtypes.java

As originally suggested by @ctrueden in http://git.io/0F7HXA
(DefaultOMEROService.toOMERO), these methods take or return
arbitrary graphs of object/rtypes. See http://git.io/9roMWw
for the original implementation in Python.

This implementation includes a cache so that cycles in the
graph are short-circuited.
Fix stackoverflow with an IdentityHashMap
Add limitations to javadoc
Merge pull request #2432 from joshmoore/rebased/develop/un-wrap-java

Add wrap() and unwrap() methods to rtypes.java (rebased onto develop)