Fix OpArg::WriteRex with 8-bit memory operand.

Previously the function was misbehaving because it would treat an 8-bit memory operand as if it referred to an 8-bit register. It would therefore emit unnecessary REX prefixes, incorrectly assert on 32-bit targets, and
could potentially emit wrong code in rare cases.

Also, some cleanup while I was in the area to make the function easier to read.