Handle directory values of scopeUri in workspace/configuration
Even though scopeUri is specified to be of documentUri type, some
servers (notably pyright) insist on passing the pathname of a
directory there. In pyright's case this is frequently useless, as the
directory is the project directory. Nevertheless we can be lenient to
those servers by detecting whether the value is a directory and doing
the right thing.
Note that we do not (yet) support per-file configuration storage.