[base] Add list utility methods to Value

This change adds a few list utility methods to base::Value. This change
is in preparation for switching the return type of the mutable GetList()
from ListStorage& to base::span<base::Value>, at which point it won't be
possible anymore to remove Values using std::vector's API.

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