Various small changes, add four new functions

There's a modified copy of libtommath here:

https://github.com/heimdal/heimdal/tree/master/lib/hcrypto/libtommath

This is a merge of the modifications done to that copy.

Contains a few small changes and a few new functions, including mp_find_prime().