Avoid StackOverflow with large IN queries

patch by slebresne; reviewed by jbellis for CASSANDRA-6567