Synchronise build system with OPM core

This pull request brings recent (and not-so-recent) changes from the OPM core build system into that of module dune-cornerpoint.  Notable additions are the `check-commits` target and updates to the handling of warnings in third-party software.