Reimplimented bitfield to fix a critical bug

The bug was pretty much exclusive to the [ABCD]H registers; the
masking of which (wrt the parent registers) are unique in that they
have zeros in the lowest significant bits rather than 1s.

So now, instead of passing a size or mode to all the various bitwise
functions, we instead pass a mask - and that contains two bits of
information - start of the mask, and end of the mask.

This of course meant that much code had to be rewritten, which is
done; and the current set of tests all pass.