core: add function z_session_manager:stop_session/2 to stop a session by id.
core: if a page or user changes then also pass the previous page/user-id so that the scripts can see what changed. Issue #816