[base] Add Value::Insert

In order to prepare for the switch of the return value of
Value::GetList() from Value::ListStorage& to span<Value> this change
adds an Insert API to Value, allowing callers to insert Values at
arbitrary positiions in the list. The signature of the API is inspired
by std::vector::insert, taking a insertion position and a Value, and
returning an iterator pointing to the just inserted element.

Bug: 646113
Change-Id: Ibacc9e1c22ee60b6f35661b66de951746e978b76
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1887694
Commit-Queue: Jan Wilken Dörrie <[email protected]>
Reviewed-by: Daniel Cheng <[email protected]>
Cr-Commit-Position: refs/heads/master@{#710725}
3 files changed