woocommerce_products_will_display improvements #4644

- Reduced number of conditionals required.
- Broken the massive category query into a loop which can break before
checking all cats
- Used a transient to further optimise the category check