Subspace diagonalization fixes
Refactoring of the code: the routine eigensolver_run was unecessarly long and is generated for real of complex wavefunctions by the preprocessor. Bugfix: the condition to run the subspace diagonalization was not really correct.
- In case the RMMDIIS was used with independent particles, the subspace diagonalisation used, whereas it was deactivated for other eigensolvers
- In case of RMMDIIS and others eigensolvers, the subspace diagonalization was done, even if states are converged.Only if not RMMDIIS and independent particles the subspace diagonalization before the eigensolver step was not done. This fix restores the original behavior.
- For CG and other eigensolvers, the subspace diagonalisation was done after the CG step (or other) wherras Kresse and Furthmueller recomand doing it before.
Refactoring and bugfix of the subspace diagonalization.
- I have checked that my code follows the Octopus coding standards
- I have added tests for all the new features added in this request.