Some refactoring of KineticsFamily.__generateReactions().

This refactoring is intended to speed things up a bit by reducing the
number of calls to generateResonanceIsomers(). To accomplish this, the
steps of removing reactions that don't match a given set of products
and combining reactions that give the same products are once again
performed separately.

The refactored algorithm also removes some duplicated code.
Some Cythonization added to Molecule.generateResonanceIsomers() et al.

We do this often enough that we want to make it as fast as possible.
Some minor Cythonization tweaks to the molecule isomorphism functions.

I don't think these actually make things any faster, but they can't hurt.
Added basic fingerprinting support for functional groups.

This is inspired by a similar implementation in RMG-Java. The idea is
that we can skip the full subgraph isomorphism by first checking that the
molecule has at least as many carbon, oxygen, and sulfur atoms and radical
electrons as the subgraph. If not, the group cannot be a subgraph of the
molecule. This especially helps in the forbidden structures checking,
which often has to deal with crazy functionalities like O-O-O-O.

I suspect that more could be done with this idea, but this is a good
first step. About 75% of the subgraph isomorphisms were eliminated in the
minimal example with this change.
Merge remote-tracking branch 'official/master'