Use 0 for post__in when no results are found

When no result is found, `$wp_query->query_vars['post__in']` should be set to `array(0)`. Currently, if no result is found, WordPress will load one post.

By the way, I fixed this in both search.php and category.php, but there is lots of duplication between those two files so you might want to extract the common functionality.