Benchmarks: move common logic into 'Bench' namespace


It's better not to polute the global namespace with helper functions.
Create the 'Bench' ns and move the functionality there.

Utilize 'inline' to solve ODR uniformly, instead of mixing it with the
static keyword.

Add includes that were missing previously, so that we follow IWYU more
closely.

Pick-to: 6.11
Change-Id: I0fe6f83c268a47f83f3e182965999f9f2e3e57f8
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
commit483be2dbb62d1b4434ca667e926db19c1cbace4b
parent7b9d72844173690fd1f2c99d186c7134eaefc4ac
authorDennis Oberst <dennis.oberst@qt.io>
committerDennis Oberst <dennis.oberst@qt.io>
commit timeThu, 26 Mar 2026 11:42:19 +0100