Merge branch 'garth/petsc-get-local-cleanup'
Merge branch 'blechta/tweak-include-order'
Fix some issues picked up by static scan, including memory leak in plotting.

There was a leak in the plotting code caused by GenericVTKPlottable not having a destructor. Adding a destructor caused an MPI error because Functions were kept in scope despite MPI finalised. This has been 'fixed' by using std::weak_ptr for storting Functions in the plotting code.
Merge branch 'garth/coverity-fixes' into next