Add const annotations

Turn some arguments into pointers
Rewrite bigint

Give user more precise control on the memory allocation of BigInt's