Move hook_entity_*() into PathautoItem to be able to prevent PathItem::insert() from running

I'm not sure yet how much code should be in the pathauto manager, the plugins and this new class, but I think we need this.

Right now, what happens is that both PathItem and our hooks/manager save an alias, this is causing duplicated aliases (see added test). It also caused issues with generation of redirects (but that is already a workaround, so I already added a workaround for the workaround there).