a round of CareLink fixes (suspend/resumes, basals, settings)

@kentquirk @jh-bate This is ready for review, including tests. I'm going to start commenting in line.
I think this change actually make sense regardless of jellyfish's behavior.

I believe the original code assumed settings changes would have different timestamps, but there is one case where MedT does a sneaky thing, and you will always have two changes at the same time. That case is creating a new basal profile. When that happens, you have the change creating the segments of the profile *and* simultaneously you have a change to make that profile your active basal profile (MedT doesn't give you a choice about this, but rather automatically switches you to the new one.)

This resulted in two settings events in the history with the exact same timestamp, but one had the correct `activeSchedule` and the other did not. Because we often need to lookup current settings in the history, it doesn't make sense to keep settings events that don't represent a "final state" of settings.