Simplify MemcacheStore at the cost of ease-of-use.
Simplify MemcacheStore at the cost of ease-of-use.

If MemcacheStore is used to store objects which are changed, then they
should be added to MemcacheStore again after they have changed.

This change also fixes a potential problem when both the MemcacheStore class
and the Session class uses register_shutdown_function. Earlier one could get
a situation where MemcacheStore-objects's shutdown-function was run first,
followed by the Session-object's. In that case the changes to the Session-
object wouldn't be saved.


rchavik/simplesamlphp,rchavik/simplesamlphp,rchavik/simplesamlphp,rchavik/simplesamlphp