Fix basis from states
Fix a condition for the case of a basis constructed from states. This only affect the current at the moment.
Minor fix for DFT+U.
- I have checked that my code follows the Octopus coding standards
-  I have added tests for all the new features added in this request.