Adds a new subscription, uses prediction data to determine a candidate vid. Existing reminders for the same
event and token are removed.
REQUIRES: predsByStopId has predictions sorted by arrival timestamp
updates the status of all registrations, returning an object representing the notifications that should be sent
PreThreshold, and trigger when the candidate
vehicle has an arrival time at or under thresh and an arrival timestamp after mustBeAfterPostThreshold and trigger when the tracked
vehicle has a pred of 1/0 or if pred becomes null and vidPredPrev <= shouldBeArrivingThreshcandidateVidpred of the tracked vehicle becomes null and the the bus isn't too close to
the stoppred of the candidate vehicle increases (can also happen from the candidate
vehicle changing)pred goes up and it doesn't seem like the bus going past the stop (this is
still relevant even when tracking a specific vehicle if routes loop back on themselves weirdly)REQUIRES: predsByStopId and predsByVid have predictions sorted by arrival timestamp
removes all subscriptions that involve both event and token
OptionalnoUpdate: boolean
Subscriptions go through a pipeline, see types above for details.