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
(Yes, I believe they were able to address the flushing issue by adjusting the length of the buffer queue.)  

So, then I am misunderstanding this code.  Isn't the `event_source` field override needed for the older version of the mobile SDK?  But since we no longer need to downgrade, is it still needed?  Or are there other segment.io client libraries that we use (or want to support) that don't have the 'channel' field?