Added some checks if metaphone and extratype may be filled or not
Fixed issue with metaphone field when empty
Revert "added searchdocument delete if the key has no data"

This reverts commit d62f2eb8cc0f5f7fb02008e1a012e0adfb16ac94.
Only use the extratype if it's truthy
Use regex in mysql query for locale matching, refs #19111
Added config to disable MetaPhone integration.