Destroy the session after a test

This can help with one hard-to-find bug in tests.

Steps to reproduce will be provided.
I'm really sure about this code.
But I'm not sure about which of php function behavior is more bug-like `session_destroy()` or `session_close()` to make a feature request to php bug tracker.