Better implementation of [GS]etForegroundWindow. Fixed focus handling on inter-thread activation. Adapted FocusIn/Out event handling to per-queue focus.