Simplified some logic:  str_replace() for extended tables now uses a string instead of an array.  Trigger for entity_tag only executes if the entity is a contact.  Minor code cleanup.
Added Trashed user_action in anticipation of recording trashed contacts (which is really an Update where isDeleted changes from FALSE to TRUE.
Added missing label_b_a field when creating the Relationship staging table.
Added a blank line.  Could not find another commit to piggyback this one on to.  Enjoy.
Removed the processing of activity_detail records.  It is not necessary, and the runtime triggers do not process these records either.