We used to fetch the WM_STATE property in event handler, but we should
only do that inside the critical section. With this commit we keep a
list of all subwins (direct children of toplevels), and keep track of
their WM_STATE properties, only fetching it in critical section when
needed.
Stop changing event masks in win_mark/unmark_client, since that's
entirely managed by the subwins now.
Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>