Bug fix in new charge optimization algorithm

The charge optimization algorithm needs to call get_potential_energy
when searching for the energy minimum. However, if the calculator
contains a reference to the ChargeRelaxation, this would autoatically
call charge_relaxation again, leading to an infinite loop. This is
fixed by introducing the option to skip charge relaxation when calling
energy evaluation.

Also fixed some ASE 3.6-3.7 incompatibilities that had been missed
previously.