Throttle set_session_expires.

set_session_expires used to update the field `session_expires` in the participants
table on each http hit.
Simplify session throttling.
Make test for events more specific.
Don't hit database most of the time.

When we do hit the database, it is going to be hit from several threads
at the same time. Thanks to the WHERE condition only one of them wins.