Fix some problem with ARPES output with spin-polarized calculations.
Description
Fix some problem with ARPES output with spin-polarized calculations. The calculation still does not give the correct result, but at least does not run out of the bounds of an array.
This is related to #687 (closed) .
Checklist
- 
I have checked that my code follows the Octopus coding standards 
- 
I have added tests for all the new features added in this request.