Bring branch up-to-date with respect to recent changes in opm-autodiff master

This is a merge commit that brings in the most recent changes from opm-autodiff's master branch.

I *think* I have resolved the conflicts in the appropriate way, but this obviously needs testing and review.