Update database configuration to validate shard spaces before creating anything.

Fixes #860. Update the validate method on shard spaces to optionally check if the database exists.