Added support for single sentence update counter upsert using "with"

Generating the following recommended syntax for upserting a value in postgres 9.1+

```
WITH upsert AS ($upsert RETURNING *)
$insert WHERE NOT EXISTS (SELECT * FROM upsert);
```

Support for where clauses inside `insert` statements, and support for `exists` and `not-exists` functions was added.