This hopefully increases the reliability of the test. Empty containers
created by “open” sometimes get spurious UnmapNotify events, and in at
least one run, this test failed because of such an event.
eval 'package foo; use strict;' enables strict within eval, it does
not leak into the surrounding scope.
Also fix various warnings/compile errors found due to now enabled
strict and warnings.