Stats implementation in progress.

Also merged upstream (required conflict resolution).
Merge pull request #34 from rod-hynes/master

Bug fixes
Merge pull request #35 from rod-hynes/master

Use an explicit stop signal to gracefully stop HTTP proxy without spurious error message
Stats gathering, processing, and updating mostly complete
Merge remote-tracking branch 'upstream/master'
Implemented fixes and changes from code review

- Renamed stats.Start and stats.Stop to be clearer that they will be part of that package (when we do sub-packages).
- Made /status request actually succeed.
- Added final stats sending. Except... it doesn't quite succeed yet. The MeekConn seems to be already closed.
- Added WaitGroup to ensure stats.Stop doesn't return until the processStats goro has stopped. Also avoids possible panic due to settings allStats.stopSignal to nil before processStats uses it.
- Changes and comments to clear lint warnings.
More changes based on code review feedback.

- Returning proper error type from DoStatusRequest
- Increased stats channel capacity
- Passing pointers to statsUpdate rather than copies of the struct. This should be much more efficient.
Fix database bugs: missing constraints (caused duplicate serverEntryProtocol rows to be inserted); need explicit delete of serverEntryProtocol rows to ensure correct state after an updated server entry is received (in particular, when old capabilities have been removed).
Enable interrupting HTTP requests in-flight when a MeekConn is closed.
Code review cleanups
Fix: iterator.Close() was not called in some cases, leaking resources
Merge pull request #36 from adam-p/master

Added stats support
Merge branch 'master' of https://github.com/Psiphon-Labs/psiphon-tunnel-core
Merge branch 'master' into android-jni