Separate the state machine into machine, states with logic and communication

The FSM is designed in such a way that each state is essentially
immutable and knows only about the world that was seen when the
state was created.

When consume is called it uses the remembered info and the new info
to determine where to go next and returns a new state instance.

This allows us to write unit tests for each state without having
to mock anything as all decisions are based only on passed immutable
structures.

This patch also kills some of the timers we used and replaces them
with separate states and universal check_timer decorator.

Change-Id: Icad82e819b653cd8b9210d0a71e0312fc6b20134
Signed-off-by: Martin Sivak <msivak@redhat.com>