Close PHP tags in tests Closes GH-12422
Restructure ext-session tests And small improvements to some