Test "NOT IN" queries

Fixes #1182 and #1171. @alazier ?
You could just create an NSPredicate here and passing that in rather than passing in the format and args.