Change how the bitmap targets work.

We mimic A5's api more closely. The central idea is that the Core keeps a
reference counted pointer to the bitmap, thus keeping it valid. When a new
target is set, it is destroyed. This reference can become dangling in several
cases:

Target is a sub-bitmap of a bitmap that gets destroyed: it is safe to destroy
this sub-bitmap, and we explicitly reset the target to be the dummy_target when
we destroy the bitmap.

Target is the backbuffer of a display that gets destroyed: this bitmap does not
get destroyed, as it is a is_ref, we explicitly reset the target to be the
dummy_target when we destroy the display.

Target is a sub-bitmap of the backbuffer of a display that gets destroyed: it
is safe to destroy this bitmap, we explicitly reset the target to be the
dummy_target when we destroy the display.

In all other cases, the reference is not dangling and we can still draw into
that bitmap.
Clean up warnings
Fiddle with targets again.

Turns out, it's simpler to just detect target invalidation and set the target
to the dummy_target at that time.
Now that we are embrasing TLS, switch to A5 style option setting