window management improvements

* better method of waiting for Thunderbird to start before hiding:
  xdotool --sync
* make RMB also work for resizing windows
* re-map windows properly when switching desktop (ensures
  adjust-new-window is called)