MFC r254120, r257862 and r267395:
- Fix out of range shifting bug in bitops.h.
- Make code a bit easier to read by adding parenthesis.

Approved by:	re, gjb @