Query: Fix category handling in pre_get_posts when pretty permalinks are in use (category_name query variable).

Merges [26864] [26874] [26875] to the 3.8 branch.

props wonderboymusic, SergeyBiryukov.
fixes #26627.


git-svn-id: https://develop.svn.wordpress.org/branches/3.8@26946 602fd350-edb4-49c9-b593-d223f7449a82