Fix runtime and race condition.
Fix runtime and race condition.

By flattening the lists to not include dicts, they become
hashable, meaning the comparisons are 5x faster, critical
with data sizes of 5k-50k rows. Race condition was due to
variable definition coming after callback.

stef1927/cassandra-dtest,blerer/cassandra-dtest,riptano/cassandra-dtest,carlyeks/cassandra-dtest,spodkowinski/cassandra-dtest,riptano/cassandra-dtest,beobal/cassandra-dtest,bdeggleston/cassandra-dtest,carlyeks/cassandra-dtest,aweisberg/cassandra-dtest,pauloricardomg/cassandra-dtest,iamaleksey/cassandra-dtest,bdeggleston/cassandra-dtest,pauloricardomg/cassandra-dtest,iamaleksey/cassandra-dtest,stef1927/cassandra-dtest,yukim/cassandra-dtest,snazy/cassandra-dtest,krummas/cassandra-dtest,thobbs/cassandra-dtest,snazy/cassandra-dtest,krummas/cassandra-dtest,pcmanus/cassandra-dtest,mambocab/cassandra-dtest,tjake/cassandra-dtest,spodkowinski/cassandra-dtest,aweisberg/cassandra-dtest,blerer/cassandra-dtest,thobbs/cassandra-dtest,beobal/cassandra-dtest,mambocab/cassandra-dtest