Fix the orientation and the selection of the idle state of the player.

The player cannot be idle if he is requesting to move in a direction in which
there is no wall.

The player is in the walk state if he has a speed on the x axis or if its
position has changed.

The direction in which the player is watching is computed according to the
change of position, not according to his speed.