refactor update/insert query to support additional features

  - added logic to handle corner cases regarding autoIncrement values
  - added support for OUTPUT variables (mssql)
  - added support for identity wrapping (related to point 1)

This may seem rather pointless right now, but I'm trying to make the eventual mssql dialect merge easier by getting small things in the [abstract dialect, main tests, library code] in now so that you just need to review the actual dialect when put up for PR.
Sounds good