Fix #168 and #169:  Rationalize 'Connection.delete_entities'

Please review this after PR #253 (it is based on that branch).

Fixes #168 and #169.

Supersedes PR #256.