Properly handle unrecognized opcodes and flags

Patch by Tyler Hobbs; reviewed by Sylvain Lebresne for CASSANDRA-7440
close CqlRecordWriter clients when finished
patch by Peter Williams; reviewed by jbellis for CASSANDRA-7459
Merge branch 'cassandra-2.0' into cassandra-2.1.0