Fix few types issues and implement types compatibility tests

Patch by Jacek Lewandowski; reviewed by Stefan Miklosovic for CASSANDRA-19479
23 files changed