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 branch 'master' into dev
Merge pull request #159 from jrconlin/master

Collapse Commands, Fix re-registration bug