Move utility methods into Raptor

These utility methods are internal to presto-main and should not be
depended on, even though they are technically available to the plugin
(which depends on presto-main due to ConnectorDataStreamProvider).
Use shared utility method