Code review rework

Made CBigNum::SetHex() use the new HexDigit() function.
Note that it didn't make any difference as this function apparently
isn't used anywhere.

Created a new CBigNum unittest to test SetHex().

Added a type cast before shifting as requested by Wladimir.