First stab at expand; logic mostly from goomwwm
Make expand toggle.

This is terrible, but funtional for now.
Refactor client position loops

Move common client detection code to its own loop and use that to test.
Should probably be inlined.
Crude snap functionality

Cribbed from goomwwm.