Make backend tests more flexible.

Do not try pyglet on py3k, because it cannot be imported.
Also skip pyglet if it cannot be imported for another reason;
there is a weird (and known) bug in it causing it to be unusable
on some systems.