Create a range index and search it using binary search.
Implement create_range_index_and_search(ranges, queries). Each range is an inclusive [start, end] pair, ranges are non-overlapping but may be unsorted, and each query must return the original range index containing it or -1 when no range matches.
Input shapes are ranges: list[list[int]] and queries: list[int]; return list[int] in query order.
def create_range_index_and_search(ranges, queries):