After the craft framework port (#8160):
- Test modules gated by cfg(all(test, not(wasm32))) weren't recognised as tests by
clippy, so their expect/panic calls counted as production code; gate them with
cfg(test) and cfg(not(wasm32)) separately.
- Remove dead test helpers, restore the Windows manifest tests the port dropped,
and fix the remaining lints (redundant clones and casts, unused imports).
- Page Setup on Windows called a main_window_handle() that doesn't exist; parent the
driver dialog to the active window again, as before the port.