Apply rewrite rules to a schema URI. If the URI starts with any key in
rewrites, that prefix is replaced with the corresponding value.
The longest matching prefix wins.
Search for lintel.toml files starting from start_dir, walking up.
Merges all configs found until one with root = true is hit (inclusive).
Returns the merged config, or None if no config file was found.