Fix bug in join rules that reference nested collections.

Closes #301.
Optimize notin self joins.

We previously sent a duplicate copy of every tuple; we no longer do this.