Use heuristic to speed up allocation of small vectors (bug#65491)
Instead of scanning vector_free_lists from the appropriate size until
we find a nonempty bucket, start at the last bucket where we last put
something in. This may favour splitting larger vectors than necessary
but in general saves a lot of time in the allocation of small vectors.
Original patch by Ihor Radchenko.
* src/alloc.c (last_inserted_vector_free_idx): New variable.
(setup_on_free_list): Set it.
(allocate_vector_from_block): Use it.
(sweep_vectors): Reset it.