Switch query execution to using prepared statements

It's important to keep users on the right track, prepared statements seems like a simple optimisation. If lazy initialisation of the prepared statements isn't ideal, it can be factored out to a separate function called in the constructor.