New well formulation

This collects the work that has been done on the new well formulation. It is not quite complete, but reproduces results on SPE1, so there should be no harm in reviewing and merging now.

Remaining work will focus on smaller details, some of which may turn out to be crucial (or not).