Send cleanup() callback before writing the print-friendly test name for ranged tests.

The print-friendly name is not known at test start, and it could be
different from the name used in a fixture, so test cleanup based on
test name would be impossible.