Added support for trailing non-positional arguments
The change makes the old hack with the own trailing-argument-parser "ad_arg_parser" obsolete by using directly the c-level argument parser which is anyhow capable of handling trailing arguments. A few changes were necessary for api doc to handle there trailing arguments as well.
The proc "db_string" is already converted to use native arguments.
Fix for issue #3442 to support range types in .xql files
PostgreSQL supports range types since 9.5. When using range types, square braces have to be used in SQL statements. Since OpenACS uses always Tcl substitution in .xql files, and OpenACS does NOT allow backslash substitution in these files, square brackets could not be escaped and therefore not be used in .xql files so far. This change allows now a developer to deactivate the substitution by passing e.g. "-subst none" to the db_* command using the .xql file. Valid values for "-subst" are "all", "none", "vars", and "commands", default is "all" which is exactly the behavior of before. Therefore, this change is fully backward compatible.