Only parse query once

Now the query string is parsed for parameters just once, when the
PreparedStatement is initialized. On each execution of the prepared
statement, the values are transformed with a separate function. This
separate function is created when the query string is parsed.