[KnownBits] Speed up ForeachKnownBits in unit test. NFC. (#94939)

Use fast unsigned arithmetic before constructing an APInt. This gives
me a ~2x speed up when running this in my Release+Asserts build:

$ unittests/Support/SupportTests
--gtest_filter=KnownBitsTest.*Exhaustive
14 jobs for main
in 0 seconds and was queued for 0 seconds