Fix WFS SortBy support for OGR layers (#4878)
WFS SortBy support for OGR layers: include WHERE clause (when available) to speed-up queries since OGR SQLite driver does not yet support fast attribute filter on SELECT result layers (#4878)
RFC109: Refactor Application of Runtime Substitutions (#4877)

- Rewrite substitution loops to first check for available VALIDATION
  patterns before looping through KVP pairs. This is possible because
  VALIDATIONs are mandatory, and speeds things up substantially in the
  general case when there are few/no substitutions to apply

- Allow runtime substitutions to apply to map->metadata,
  layer->metadata, and all outputformat->formatoptions