1st pass at getting library to compile properly.

missing some of the deinit routines (they had problems before and they will
need to be checked carefully).  One or two other minor things as well.

Might rework the __double code to make it a bit simpler.

Also not convinced that all the #ifdefs are actually required.  We'll see.
add fixpoint and build library.