Major Refactor to support dialect extension files

The main piece here was splitting up each statement's `_toString()` into an ordered set of clauses, each with a separate `clause_id` and templating function. This will enable adding or overriding specific clauses in dialect extension files.

I also fixed some DRY violations by creating a few helper functions that help create the common API methods (a method that takes a list of columns, a method that takes a list of tables, etc), wrote a mini templating language to make it easier to define the different clauses and fixed a bug in the `FOR UPDATE` syntax.