Don't include xposted research in related stories. Fix broken query.

The `$pro_channel` and `NOT EXISTS` lines exclude the xposted Pro content. The rest of the changeset fixes a bug that causes the related query to fail to generate properly if the given post doesn't have terms in all the supported taxonomies.
Merge pull request #5 from borkweb/6283-exclude-research-from-related

Don't include xposted research in related stories. Fix broken query.