Small changes to the segment.io event handler

Fix a couple of outstanding issues discovered during end-to-end testing:

1) The segment.io client libraries don't always set the channel field properly, allow it to be overridden.
2) Parse out the userAgent from the segment.io event and put in the normal location it is found in tracking log events.
3) The userId provided in the segment.io event is not necessarily an integer, so ensure we cast it to one before saving it out to the tracking logs.

Reviewers: @rocha, @nasthagiri
FYI: @brianhw, @stroilova, @gwprice
I like this idea, however, at that point the cat is kind of out of the bag since the secret key will have been transmitted to our server via an unencrypted channel.

Maybe we could do something like log a critical error and write some kind of splunk based alert that emails us if we ever mess this up?

In the meantime we could continue to log the events so that we don't lose data while we are fixing the issue...