changes and bigfixes, see pull-request #113 at https://github.com/libtom/libtommath/pull/113 for details