Fixed bug in degeneracy during KineticsFamily.generateReactions().
Fixed bug in degeneracy during KineticsFamily.generateReactions().

When generating reactions, the important degeneracy is that in the
direction the kinetics are defined. However, a significant portion of the
time, the reactions are generated in the reverse direction (using the
product templates that were auto-generated from the reactant templates).

To address this, a new method calculateDegeneracy() was added to
KineticsFamily that takes a reaction in the direction the kinetics are
defined and returns its degeneracy by quickly generating reactions in that
family only and keeping only the one that has the same reactants and
products as the input reaction. (Note that we ought to be considering
different reaction templates too, but that is deferred for now.)

Before we were just using the degeneracy in the opposite direction, which
is probably worse than just setting it to 1. Now we should be using the
best-estimate degeneracy in the direction the kinetics are defined at all
times.

enochd/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,enochd/RMG-Py,KEHANG/RMG-Py,nyee/RMG-Py,faribas/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,comocheng/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,KEHANG/RMG-Py,nickvandewiele/RMG-Py,comocheng/RMG-Py