Statistics and connection callbacks.

- Now post events and timings to statsd (UDP).
- The implementation logic can now receive connection-success and connection-fail callbacks.