Various fixes and improvements
Various fixes and improvements

* getCheckPointForScreen()
   * Off by one issue resulted in missed checkpoint detection
   * State was saved incorrectly, even when a checkpoint was found

* Fixed issue where saveState() was incorrectly saving future commands
  and so generating unreplayable history.

* Fixed issue where reset() was pruning history when loading in fresh
  history.  (Might return to this with a more elegant solution.)

* Fixed issue where the execCounter wasn't reset on the first command
  on manual resets.

* Various small fixes, unused variables removed, comment cleanups

DougHaber/pitfall-agent-javatari,DougHaber/pitfall-agent-javatari