Filter error log statements by sqlstate

Allow the default log_min_error_statement to be overridden per sqlstate to
make it possible to filter out some error types while maintaining a low
log_min_error_statement or enable logging for some error types when the
default is to not log anything.

(cherry picked from commit 967c9347793ed8d3bb9c3116886ed2853c43c067)