Add StateManager and example

- The StateManager saves values automatically
  when the android system calls onSaveInstanceState