Refine commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811: Avoid loading [j]awt native libs and null-cursor creation in headless mode

Commit 9fb1e46e43900ec9b2f9c9af1fc8984e101c8811 exposed sideffects,
i.e. libjawt.so could not be loaded in JAWTUtil's static-init while in headless mode.

JAWTUtil's static init block was triggered from AWTMisc debug flag changes.

Fix drops operations in headless mode:
  - JAWTUtil
    - awt native lib loading
    - querying headfull features (locking, java2d ..)

  - AWTMisc
    - creating null cursor
Merge branch 'master' into 2.2-train