Session - moved regeneration of session ID to individual method

I needed to generate session ID in my own way, so I moved call of session_regenerate_id() to protected method. Now it is possible to override creation and setting of session ID.

Also added check if newly generated session ID is in correct format.