Invalidate the settings cache for a key before saving it.
Invalidate the settings cache for a key before saving it.

In the current behavior, if the setting cache is enabled and a setting
is changed, then an event listener bound to `model.setting.save.after`
that gets the setting will obtain the old value, not the new value.  The
event has the new value in it, but fetching from the setting gets the
old one.

This change invalidates the cache before the save.  We can't set it
before save, since that would bypass validation.

There is still the potential for a race condition where if two different
threads are setting a key nearly simultaneously, then the wrong one
could end up in the cache (that is, not the same one that ends up in the
database).  This change is still a strict improvement of the current
behavior.

girder/girder,girder/girder,Kitware/girder,RafaelPalomar/girder,Kitware/girder,manthey/girder,RafaelPalomar/girder,Kitware/girder,manthey/girder,RafaelPalomar/girder,manthey/girder,Kitware/girder,manthey/girder,girder/girder,RafaelPalomar/girder,girder/girder,RafaelPalomar/girder