RegularStatement implementations need access to the protocol version and codec registry for certain operations (serialize their values, inline values in built statements, etc.).
In 3.0, we initially solved that problem by making these types "attached" to a specific session, which changes the way to create them: Session#newSimpleStatement (instead of a constructor) and new QueryBuilder(session) (instead of static methods).
In hindsight this will be quite annoying when migrating from 2.1 to 3.0, and inconvenient for special cases like unit tests. I think it's better to go back to passing the protocol version and codec registry to methods that need them, and in some cases provide no-arg versions with sensible defaults for people who will not use custom codecs, or will register them against the default registry.
Reverted to new SimpleStatement(...) and static QueryBuilder methods.
As a consequence, the following methods were refactored:
`Statement`. The following public methods were modified:
`getRoutingKey(ProtocolVersion, CodecRegistry)`: both parameters added.
`RegularStatement`. The following public methods were modified:
`getValues(ProtocolVersion, CodecRegistry)`: second parameter added.
`getQueryString(CodecRegistry)` and `hasValues(CodecRegistry)`: parameter added. No-arg versions are still present
and use the default codec registry; refer to the Javadocs for guidance on which version to use.