Update session.php

Wrapped the whole processing by a check for the configured session handler, as currently only 'database' is supported by this tweak. Also, the flag variable name is now flexible (set by the counterpart user-session plugin) and read from the counterpart plugin's params. This allows for a flexible session update flag variable name.