This PR addresses the following issues:
1) All requests return a 200 OK unless there is an authorization failure. This is deliberate in case the secret key is compromised.
2) Push all of the nasty logic necessary to generate compatible video events into the LMS instead of trying to do that mapping on the mobile devices.
3) Stop using the deprecated "action" field in the segment.io event. According to their support team this field should not be used anymore and is just around for backwards compatibility reasons.
Fixes: AN-3818
When event-tracking was fully integrated into the platform, some data was replicated in the context in the middleware and then later extracted and moved the old location by event-tracking. The legacy code path was not updated to remove this transient shim data from the context resulting in duplication of the information. This patch ensures that the transient information is removed from the context before emitting the event.
Fixes: AN-2369
Support incremental conversion of events from the old API to the new, in order to ensure the new system is working, enrollment events have been modified to make use of the new API.
* Add unit test coverage for this "exclusion from tracking" logic
* Exclude based on regex match instead of raw string comparison
* Exclude heartbeat requests from tracking