Java focus workaround for #227

This pull request contains a workaround for the focus problems with some java application as discussed in #227.

From the workaround:
```python
# Workaround for misbehaving java applications (actually it might be
# qtile who misbehaves by not implementing some X11 protocol correctly).
#
# See this xmonad issue for more information on the problem:
# http://code.google.com/p/xmonad/issues/detail?id=177
#
# The meaning of the java variable:
# 0: not a java application
# 1: a main window of a java application. Only send WM_TAKE_FOCUS
#    not FocusIn
# 2: a dialog of a java application. Do not send any event.
#
# We can distinguish these window types by checking the window's
# classes for 'sun-awt-X11-XFramePeer' and sun-awt-X11-XDialogPeer'.
```