Validate indices in Atom/Bond::isValid.

Change-Id: I2234540f0b5acca12ba47f379ccfc73389f1d759
Add/test editable molecule and templated atom/bond classes.

Added RWMolecule, which logs changes into a QUndoStack, and
templated implementations of Atom and Bond that can (eventually)
be shared between all molecule classes.

Change-Id: Ied9ed23b48edeadb9828e172ce974ad5bae7b57f
Merge topic 'editable-molecule' into master

950a5030 Add/test editable molecule and templated atom/bond classes.
f7d56cc1 Validate indices in Atom/Bond::isValid.