Fix bug 1030797

* attempt update before insertion for register (since delete
  doesn't seem to always work right)
Collapse commands to most recent only.

* Prevent command queue from getting flooded.
* NOTE: no cmd filtering being done on client (TODO to fix this)
Merge pull request #158 from jrconlin/dev

Collapse Commands, Fix re-registration bug