Added support for pre-delete of entity from backspace

Added a class to an entity container to mark it as pending delete
requiring a second backspace or a delete keypress to cause the actual
removal of the entity. This should reduce accidental removals.