Add event publication when saving

Add event notifications to the save functions so that specifications can, if they wish, subscribe to the events to do processing prior to saving a snapshot (e.g., if a spec has some dynamic content and the author wants to be certain it is in a base state before saving).
Moved the notifications

Moved the calls to respecEvents.pub into the toString and toXML
methods so that they get called even in the event of a browser that
supports direct downloading.
Merge pull request #335 from halindrome/patch-6

Saving should support a respecEvent