compiletest: Add support for metrics and ratchet modes.
Add configure and make machinery to activate perf metrics and ratchets.
extra: reduce bench loop max time to 3s.