Added syncService.running flag and changed to setTimeout() instead of setInterval().

References #29.
Corrected math in syncService#latency, and made it a bit more readable.
Use more idiomatic (if less performant in cases that should never occur) code for trimming syncService.pingTimes.
Only recalculate average latency when we get a new ping measurement.
Broadcast the 'syncService.latencyChanged' event when the average latency changes.
Added missing semicolon.
Spec has changed so events only ever consist of a name and a payload; we no longer need arbitrary-length args.
Corrected end comments.
Corrected `this` vs. `self` mismatches, and added missing `` dependency.
Stop sync service on `disconnect` or `reconnect_failed`.
Update latency widget based on 'syncService.latencyChanged' event instead of defining a property.
Merge pull request #33 from SkewedAspect/dbronke-sync-service-fixes

Sync service fixes