Change bit numbering convention in TestBit*/ExtractBit* APIs

... such that the least significant bit is bit 0 and thus independent
of execution mode.