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