Bug #66481 Segfaults on session_name()

If the previous value of session.name was NULL then any call to
session_name($string) would result in a segmentation fault.

This changes the behaviour to return NULL from the function if the
previous value was NULL. This is consistent with the documentation for
the function which states that it "[r]eturns the name of the current
session".