Make EntityDeleteMixin.delete synchronous

When an entity is deleted, an HTTP 202 response may be generated, indicating
that a task for that action has been created. Make `EntityDeleteMixin.delete`
look for an HTTP 202 response and, if one is received, wait for the task to
complete.

As part of this refactoring, create a helper function which polls the server,
and make both `orm.EntityDeleteMixin` and `entities.ForemanTask` use this helper
function.