Various fixes to MPFR java

I made several small changes to the library in order to be able to support its use for K. @andreistefanescu please reveiew.