Send Foscam events through runCommand and simplify it a bit.  Change templates to always use {{XXX_DYNAMIC}}.  Added tests for parsers.  Some other cleanup.