prevent searchword redirect when we're serving an endpoint request or in admin dashboard

this takes care of the broken search suggest bug and also the admin dash search bug

see https://github.com/GigaOM/legacy-pro/issues/4101 and https://github.com/GigaOM/legacy-pro/issues/4107
`scriblio()->get_terms_as_facets()` casts its return value is an `object`, which may be an empty array. if we leave it as an object then the `is_empty()` call below will not work correctly and may let an empty facet pass through, which can cause a fatal.