Added confirmation dialog when pressing back button during play.

To avoid accidental quiting of the game during play when a player presses
the back button, a confirmation dialog was added to ask the player for
confirmation.