Fix a bug in which the switching function would not get toggled if requested via
the switchDistance argument to CharmmPsfFile.createSystem().

Also add a check to protect against negative switching distances.