Changes in progress for inclusion of other solvers,

and reimplementation in C++ of the objective function
First working version, mainly with Rdonlp2
polyroot checks working
some cleanups
implemented the other measures apart from lik