The old strategy of switching a transparent window to solid and back
doesn't work on 10.11; it appears that queued messages must be handled
for the window to become visible, but that's not allowed during a GC.
The strategy for 10.11 and up create an OpenGL canvas, which acts as a
direct-to-screen drawing area that a GC callback can affect without
Racket-level allocation.
Allocation rules:
* Use `as-objc-allocation' when creating a Cocoa object. When the
resulting reference becomes unreachable, the Cocoa object will be
released.
* Use `with-autorelease' in atomic mode around calls that autorelease
and where the release should take effect immediate. Do not create
an autorelease pool except in atomic mode.
* Other autoreleased objects may end up in the root pool installed by
"pool.rkt". The root pool is periodically destroyed and replaced;
call `queue-autorelease-flush' if you need to encurage replacement
of the pool. If you need to use an object that might be autoflushed,
be sure that you're in atomic mode.