[cassandra] Move static methods to separate class.

This is a redo of 60ff28daa5656cab5b0dcbf58e8e8ec7fdd72598, minus the
breakage.