When updating SAs, look at event status.  #3128, #2607, #2815.

The merge-from-Field process may create closed events for participants
enrolled from Field.  Prior to this commit, OperationalImporterPscSync
would register and schedule those participants, but it would not close
corresponding scheduled activities.

This led to a situation where we'd have closed events in Cases and
scheduled activities in PSC, which (AFAIK) isn't supposed to happen.
Future fieldwork retrievals for the new participant would become
inconsistent: the entries in the scheduled activity report would
translate into instructions to perform events and instruments that had
already been performed.

This commit changes that situation.  Events that have an end date are
considered complete by Cases; this commit gives
OperationalImporterPscSync the same semantics when updating SA
histories.  With this change, event and SA state are in sync for
participants enrolled from Field.

IMPORTANT: I have no idea if this is the right thing to do in all
situations.  This commit contains a modification to a spec that expects
an SA to be *scheduled* for an event that has an explicit end date, and
I wasn't able to figure out *why* from the spec context or commit
comments.  So I'm not sure if that example is in error or if there's
something more subtle about the event-SA relationship that I'm missing.
PBS state transitions and a method to execute them.  #3128.

The specs for Participant#advance only address the PBS -> PV1 -> PV2
flow because that's the issue of immediate concern for #3128.
Add participant scheduling to merge process.  #3128.

I justify the lack of tests by noting that all this code does is glue
stuff together.  Hopefully this won't come back to bite me.
Strip additional spaces.