make num of groups no longer off-by-one; from Alexander Polakov

note that a re-exec of cwm will not rewrite the group number atom of
*existing* clients, so they will remain off-by-one until each client has
its atom updated, or of course a restart of X.
replace emptystring with strdup here as well so we know we are free'ing
a malloc'd variable everytime; from Tiago Cunha
least intrusive way to plug a memleak when unbinding a duplicate key for
kbfunc_cmdexec; from Tiago Cunha
after we toggle a group hidden, it makes no sense to set it as active
(in sticky or non-stick mode), regardless of existing clients assigned
to that group; oga marked this bit XXX in -r1.34 for it didn't seem make
sense then either.

pulled from a diff from from Alexander Polakov.
info->xine, for consistent variable names
more variable consistency
have screen_find_xinerama() return struct geom *reliably* instead of
XineramaScreenInfo; simplifies goop around the callers.
merge in Xinerama screen query; no functional change.
re-work client_snapcalc() so it takes client and edge dimensions with
snapdist; allows for simplier snap calculations.

required for an upcoming diff for honoring gap.
pass the screen workarea, as opposed to viewarea, allowing client
snapping to honor gap.
Sync with latest upstream changes.