Add support for multiple hosts (with retries) and raw queries.

This allows hosts to be specified as a comma-delimited list and adds support for automatic retries. It also allows users to enter raw queries rather than using the query builder.