Fixes #4657: Reset the globals after running the tests

This pull should fix this bug:
http://dev.kohanaframework.org/issues/4657