Preliminary version of Buchberger algorithm. Needs better data structure for maintaining resulting basis in term order