Please don't merge - i'm using test harness to check for errors

There are important, very subtle changes here in addition to the
refactoring that involve the residual2.

Also included more tests of the multi-surface stuff, and
relaxed tolerances in mohr-coulomb tests to get passes on different
architectures.

Addresses #3879 , but does not fix it to my satistfaction yet