Fix a number of obscure issues

The fixes include:
- Reorder residues as well as atoms when forcing atoms in the same molecule to appear contiguously
- Add a `sort` attribute to `Residue` to sort the atoms to appear in the same order as they do in their resident `AtomList`
- Add a `sort` attribute to `ResidueList` to sort the residues by the index of their first atom in that atom's resident `AtomList`
- Add a function to determine if dihedrals need to have their end-groups excluded after a bond or angle was added due to the creation of rings
- Allow `AmberMask` object to work with any `Structure` instance (or any instances of `Structure` subclasses)