Report test name in case of runtest failure; add missing print_function.

Make runtests.py report the name of a test if an exception is thrown
before it outputs the test name normally. This makes sure that the
name of a test is printed even in the face of runtest machinery failure.

Added a print_function import from __future__ to test_codegen, which
would make tests fail all over the place when --enhance-asserts was
active.
Merge remote-tracking branch 'origin/master' into report-test-name-on-early-failure
Removed duplicate import.
Merge remote-tracking branch 'origin/master' into report-test-name-on-early-failure
Merge pull request #2497 from toolforger/report-test-name-on-early-failure

Report test name in case of runtest failure; add missing print_function.