Stop rendering HTML if failed AJAX search

The catalogue AJAX suggest action unnecessarily continues to render HTML when
the query isn't even valid. Update the logic so failed AJAX search requests now
exclusively redirect you to the home page.
Improve admin dashboard database queries
Improve order database query