improved endcapping

Thanks to Martin Sandve Alnaes from Simula, Norway for contributing improvements to capping. Now we can use a mix of methods for different boundaries without losing boundary markers for subsequent meshing.