Execute lifecycle hooks in Eff monad

We define specs for UI and stateful UI components as records with lifecycle
hooks typed accordingly. For example componentWillUpdate won't be allowed to
write to state (as React requires).

I'm sorry for a lot of whitespace changes, I wasn't able to keep them in a
separate commit.
Examples and Makefile: minor fixes