Respect order when one handler is added inside another handler.

Fixes #1 and complies to Promise/A+ 1.3.1.
Eliminate separate changeState function.