fix Newton's method's convergence checks

There are two convergence criteria implemented in Newton's method, one based
on ||F(x)|| and one based on ||dx||. There used to be a bit of confusion as
to when to check the respective residuals. This led the implementation to
unconditionally solve a linear system even if ||F(x)|| was below tolerance.
This commit fixes this.

Typical output will now be

  Newton iteration 0: r (abs) = 1.045e+02 (tol = 1.000e-10) r (rel) = 1.000e+00 (tol = 0.000e+00)
  Solving linear system of size 25028 x 25028 (PETSc Krylov solver).
  Newton iteration 1: r (abs) = 1.600e+02 (tol = 1.000e-10) r (rel) = 1.532e+00 (tol = 0.000e+00)
  Solving linear system of size 25028 x 25028 (PETSc Krylov solver).
  Newton iteration 2: r (abs) = 3.393e-04 (tol = 1.000e-10) r (rel) = 3.248e-06 (tol = 0.000e+00)
  Solving linear system of size 25028 x 25028 (PETSc Krylov solver).
  Newton iteration 3: r (abs) = 2.276e-10 (tol = 1.000e-10) r (rel) = 2.178e-12 (tol = 0.000e+00)
  Solving linear system of size 25028 x 25028 (PETSc Krylov solver).
  Newton iteration 4: r (abs) = 4.153e-12 (tol = 1.000e-10) r (rel) = 3.976e-14 (tol = 0.000e+00)
  Newton solver finished in 4 iterations and 17 linear solver iterations.
Minor pugixml simplification.
Add BLAS libs for PETSc tests on OSX.

Problem is that ResolveCompilerPaths, which builds a list of libaries with the full path, discards the OSX Accelerate framework.
Add missing CMake file.
Minir initialisation fix.
Merge branch 'garth/xml-cleanup'
Merge branch 'garth/fix-petsc-osx-detection'
Merge branch 'nschloe/newton-msg'