[metadata] remove dead code of metadata routes handling (#77336)
### What
- `[].[ext]` was temporary convention invented in a PR but we never decided to go that way. Remove the tests for it
- `dynamicExtensions` can be either empty array or null, for both case it can skip adding the regex for it. This just saves some bytes for generated regex. Also added some test