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: I6541b52d090b0ea3f17c987ed2595d086bd1c3a1