Fixes #1501 stackoverflow by and predicate
Add 'and' tests + test cleanup
Merge pull request #1515 from pveentjer/fix/3.x/andresultset-stackoverflow

Fix/3.x/andresultset stackoverflow