Make q unsigned, move pow-of-2 check, part 2.
Make q unsigned, move pow-of-2 check, part 2.

This ports commits 87d807b and fab5f9d from d2s.c to f2s.c,
also fixing signedness warnings.

ulfjack/ryu,ulfjack/ryu,ulfjack/ryu,ulfjack/ryu