State routine to grid
Moving some routines that manipulate mesh functions to mesh_function.F90. These allow to move some code to lower level. The routines are changed to use blas, as it was done in some places. Moreover some safe tests are added to make these routines more robust if possible.
Making the code more robust for some mesh functions.
- I have checked that my code follows the Octopus coding standards
- I have added tests for all the new features added in this request.