Allow plugin authors to define database queries using new syntax

This is designed to make the life easier for plugin authors to choose
when to update their plugins.

In 1.2 we have only old DB syntax.
In 1.3 we allow the new syntax, and continue to use adodb.
In 2.x we use the new syntax and move to the PDO based layer.