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.
So my question for the meeting is...do we really want that code in the simulator, or should it be in the code that drives the simulator?