machines: properly show an empty state when the URL does not match a resource
machines: properly show an empty state when the URL does not match a resource

This also applies to the scenario, that a VM get's undefined while we are
on its VM details page.
If the operation that caused the 'Undefine' event was performed through the
UI, then we automatically redirect the user to the main VMs list.
However, if the 'Undefine' event was caused by an external operation,
then we leave the user on page they are on and show an empty state.

The reason behind is, is that we also get 'Undefine' events when
installing VMs and in that case we don't want to redirect the user to
another page.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1916597

garrett/cockpit,cockpit-project/cockpit,garrett/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,martinpitt/cockpit,mvollmer/cockpit,garrett/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,cockpit-project/cockpit,mvollmer/cockpit,martinpitt/cockpit,cockpit-project/cockpit,garrett/cockpit,mvollmer/cockpit,mvollmer/cockpit,garrett/cockpit,mvollmer/cockpit