extra::test: define an opaque function to assist with accurate benchmarking.

This allows a result to be marked as "used" by passing it to a function
LLVM cannot see inside (unless LTO is enabled).

Closes #8261.