Rename eight-queens.py -> eight_queens.py

This was done so that it could be loaded as a module for testing
purposes.
Simplify StateMachine