NamespaceString has a few methods for determining if a database name is valid, some which take a string others which take a DatabaseName. These feel like they belong on the new DatabaseName type (which is concerned with thinking about database names). I propose the following changes:
- DatabaseName::isValid which can validate an existing DatabaseName is valid, per the rules in NamespaceString::validDbName(DatabaseName)
- static DatabaseName::isValid(StringData) which replaces NamespaceString::validDbName(StringData)
- All cases where we call validDBName(DatabaseName::db) (example) be converted to use the new DatbaseName::isValid