(bidi_cache_idx, bidi_cache_last_idx, bidi_cache_fetch_state)
(bidi_cache_search, bidi_cache_find_level_change)
(bidi_cache_iterator_state, bidi_cache_find, bidi_find_other_level_edge)
(bidi_dump_cached_states):
Don't arbitrarily limit cache indexes to int; use ptrdiff_t instead.
(bidi_cache_size): Use ptrdiff_t rather than size_t, as we prefer
signed integers.
(elsz): Make it a (signed) constant.
(bidi_cache_iterator_state): Check for size-calculation overflow.