move HLP functions to BigInt

wherein helper functions that depend on the internal representation of
bigints are relocated to the bigint fork

issue #39
lint
fix test after merge