state: Minor fixes and documentation additions
state: Minor fixes and documentation additions

Clean up the code a bit, and move common code paths into separate
function. Also, document clutter_state_set() with examples.

GNOME/clutter,Distrotech/clutter,nobled/clutter,rkudiyarov/clutter_osx,nobled/clutter,djdeath/clutter-multithreaded,heysion/clutter-clone,spatulasnout/clutter,djdeath/clutter,jigpu/clutter,kerrickstaley/clutter-vala,dlespiau/clutter,jigpu/clutter,GNOME/clutter,Distrotech/clutter,dlespiau/clutter,djdeath/clutter-multithreaded,ebassi/clutter,djdeath/clutter,rkudiyarov/clutter_osx,rkudiyarov/clutter_osx,jigpu/clutter,djdeath/clutter-android,djdeath/clutter-android,GNOME/clutter,djdeath/clutter-android,djdeath/clutter-android,kerrickstaley/clutter-vala,ebassi/clutter,jigpu/clutter,spatulasnout/clutter,spatulasnout/clutter,heysion/clutter-clone,ebassi/clutter,kerrickstaley/clutter-vala,djdeath/clutter-multithreaded,djdeath/clutter,Distrotech/clutter,ebassi/clutter,djdeath/clutter,kerrickstaley/clutter-vala,spatulasnout/clutter,djdeath/clutter,djdeath/clutter,GNOME/clutter,dlespiau/clutter,collects/clutter,collects/clutter,heysion/clutter-clone,collects/clutter,collects/clutter,collects/clutter,Distrotech/clutter,ebassi/clutter,Distrotech/clutter,heysion/clutter-clone,nobled/clutter,jigpu/clutter,rkudiyarov/clutter_osx,Distrotech/clutter,spatulasnout/clutter,GNOME/clutter,heysion/clutter-clone,jigpu/clutter,djdeath/clutter-android,djdeath/clutter-multithreaded