Use session_id() instead of $wgSessionStarted to check for session existence

More reliable check and so that $wgSessionStarted can be removed at some point.

Change-Id: Ia60e49a127183796d1d9c34ef3d57916891d72c1