Added support for shared properties in dictionary, which are not cloned
during cloning.
Added support for directly or indirectly self containing dictionaries
during cloning.

Signed-off-by: Jakob Brandsborg Ehmsen <jakobehmsen.github@gmail.com>