Improved state_change_natoms and used it more
If the t_state control flags indicate that per-atom arrays will be
used, resize them appropriately whenever this routine is called.
CG minimization and non-DD simulations take care of organizing their
own state flags and allocations, rather than relying on code located
elsewhere. Non-DD used to rely on the allocation of x made when
reading the tpr, and perhaps one for v made in set_state_entries (if
not read from the tpr), and one for f made in do_md or init_em.
Commented more widely about why allocations for force arrays are
of size natoms+1.
Change-Id: I803c2695969f78616016520cdd8e9425507ab7c1