Fix prepare_sql.
Update and extend documentation, adding an example.
Dispatch oneshot on dialect and change exception types.

  - Change type of Oneshot to accept a function, and replace oneshot with
    oneshot_full, oneshot_fun, oneshot_any, and oneshot_sql.
  - In exceptions, replace query with a new query_info, which contains only
    the relevant query string for the dialect.