Entity improvements

This commit ensures that empty tags are removed when all associated
entities are deleted, clears all pending events unless the EventQueue is
aborted, and adds the .by_tag() method to the EntityManager, which
returns an array of entities by their tag(s).