Closes #4979
Original patch by @fmoralesc
It is otherwise impossible to determine which test failed sanitizer/valgrind check. test/functional/helpers.lua module return was changed so that tests which do not provide after_each function to get new check will automatically fail.
TabNewEntered is triggered after vim has entered a buffer in new tab.