Feature/unit tests and polynomial refactor

Refactored  the BasePolynomialFunction and OptimizedPolynomialFunction classes, and added unit tests  for homomorphic function generation.
roger