Added more comprehensive hit test. This fails for now.
Fixed check for vertical bounds.

This cures the test.
Replaced polygon hit test using awt by our own version.

In principle, the core should be graphics/gui free by now.