switch to new big_number set_compact()/compact() code from bitcoind for compatibility.
switch to static_cast instead of c style cast.