The GC's getClipping() operation stores region handles representing the
clipping region (potentially at different zooms) that is combined with
the passed region object. The handles for that passed region object are
created lazy, so that the clipping region handle needs to be stored
until that point in time. Otherwise it will leads to failures when
lazily creating the handle for the passed region later on. Currently,
these handles are stored in the GC operations and in case the GC or its
operations are disposed too early, the region filled via a
GC.getClipping() call will fail to create a proper region handle.
This change moves the responsibility for managing the lifecycle of the
stored clipping regions to the Region instance in which they are used.
Copies of that region ensure via reference counting that only the last
disposed Region instance consuming the clipping region will dispose the
according handle. A regression test for the scenario that the GC is
disposed before consuming the Region handle to which the clipping region
is applied is added.