Support DISTINCT for static columns

This also fix the behaviour when DISTINCT is not used.

patch by slebresne; reviewed by thobbs for CASSANDRA-7305
Refuse range queries with strict bounds on compact tables

patch by slebresne; reviewed by iamaleksey for CASSANDRA-7059