[BUGFIX] Reduce side effects of sessions used in functional tests
This patch makes sure that once a session has been closed or
destroyed, it will rebuild information determined from the request /
response in case it is started again.
While this scenario (a session is closed and started again during
the same PHP request) is uncommon in real world projects, it may
happen during functional tests. Therefore this is mainly a fix to
reduce side effects in functional tests.
A concrete side effect Flow has without this patch is that session
cookies are set to the HTTP response only when a session was
started the first time.
This patch also adds an explanation about starting / resuming
sessions to the class doc comment.