Many minor changes

1. The most important one should be correcting one bug in checking convergency.
   Previously the calculation for the number of convergent cells is wrong, and
   the inequality used to check convergency is wrong.
2. For updating the parameters of upper layers, the procedure is simplified.
3. The heating/cooling part has a major problem in OI cooling.  I guess this is
   due to the high abundance of O, because O cannot be converted into O2 due to
   photodissociation.  So maybe the self-shielding of O2 needs to be
   considered?