Added smarted digit counting/checking

Should result in less malloc-ing
Made MPZ code full GPU/CPU compatible

Wrote two test programs. One runs the MPZ code on the cpu, the
other runs the MPZ code on the gpu. Both run and pass all tests.