Refactored State with transactional operations.

Exposed public methods call the necessary functions to reflect the
changes.
Refactored reset_all to use one State call.

State.setState can now accept one or more IDs or DOM elements as second
parameter.
Merge pull request #46 from MattiasBuelens/state-refactor

State refactor