Improve nonbonded exception handling when using setBond/setAngle.

This also significantly simplifies addDihedral by getting rid of the "multiterm"
type. End-group ignoring is determined automatically from the existing bonds,
angles, and dihedrals, so exception handling is always dealt with correctly and
makes it harder to disobey the standard rules of classical force fields with
this command.