Added a debugging aid, making it easier to debug layer issues.

This sets the property 'SMALLWM_LAYER' on all clients, to what the
current layer of the client's window is.
Refactored ClientManager::state_transition into many smaller functions.

This was done by creating a lookup table, and then making
ClientManager::state_transition into a fairly simple lookup-and-execute.

This also made a number of other changes necessary:
 - Removed useless `set_state` calls, since ClientManager::state_transition
   handles this on its own.
 - Fixed some bugs relating to when the relayering is done after moving/resizing
   or showing an iconified client.
 - ClientManager::focus now returns a flag indicating its success. This is
   to allow the state changing functions to accurately reflect the current
   state if ClientManager::focus fails.