Convert `category__and` to `category__in` (less expensive) and unset it when only one category is passed. Adds unit tests.

Fixes #24245.




git-svn-id: https://develop.svn.wordpress.org/trunk@25238 602fd350-edb4-49c9-b593-d223f7449a82