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
Also, what are the possible values for `channel` and `event_source`?  Aren't there different owners for each of these (segment.io owns the former, while the latter is governed by our various clients)?  What if different owners choose to use the same name for semantically-different channels? 
If you agree this could be a potential issue, perhaps we keep and persist these as separate fields.