Make sure the mp_int is cleared so that any exisiting bigint is freed. Tidy up api.c code.
./benchmark -shake 1024