URL encode the SOQL query string

Replace the current encoder (that only replaces spaces) with the
java.net.URLEncoder. This allows the SOQL to (for example) contain
parenthesis.