Fix calculation of the gcee grand potential.
Fix calculation of the gcee grand potential.

Previously, we moved from subensemble 0 forward for AEE (or from
the last subensemble backward for TEE), calculating the grand
potential using the N=0 probability distribution if it was
sampled. Now, we check to see if the first or last subensemble is
sampled, and move in the appropriate direction if one of them
is. Otherwise, we find the first sampled subensemble and move
forward. We also only use the N=0 state to calculate the grand
potential in continuous blocks: upon encountering the first
non-sampled state, we switch to using the lnpi_op differences for
the rest of the calculation.

adamrall/coex