States pt. 2

Major change was making the game states inherit from a new generic
States interface in state.js. All state-related operations that are the
same for every future state is added to that file. More comments are in
the file state.js.