Implement binary_search for `collections::Vec` (#836)

* [storage] Implement binary_search

* [storage] Add binary_search testcase for missing smaller element

* [storage] use indexing instead of Vec::get

Co-authored-by: Robin Freyler <robbepop@web.de>

* [storage] Port binary_search tests from core

* [storage] Format tests

* [storage] Format tests

* Remove old comment

Co-authored-by: Robin Freyler <robbepop@web.de>

* [storage] Incorporate review feedback

* [CI] add comparator to spellcheck

Porting binary_search to the storage Vec, including the documentation found in core, led to a failure in spellcheck. Since core is considered to be correct, it is updated on spellcheck.

* incorporate review feedback

* add permalink to stdlib source

* Split long line

* fix examples

* RustFmt the doc examples

Co-authored-by: Robin Freyler <robbepop@web.de>
Co-authored-by: Hernando Castano <hernando@hcastano.com>
22 jobs for master in 8 minutes and 40 seconds (queued for 3 seconds)
Name Stage Failure
failed
clippy-wasm Workspace
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `ink_env`

Caused by:
process didn't exit successfully: `sccache /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name ink_env --edition=2018 crates/env/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=856492d313c0354c -C extra-filename=-856492d313c0354c --out-dir /ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps --target wasm32-unknown-unknown -L dependency=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps -L dependency=/ci-cache/ink/targets/master/clippy-wasm/debug/deps --extern arrayref=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libarrayref-7a7d74cd021823ac.rmeta --extern cfg_if=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libcfg_if-a4ce9583d7511382.rmeta --extern derive_more=/ci-cache/ink/targets/master/clippy-wasm/debug/deps/libderive_more-6df2f2cbc1fc4a1b.so --extern ink_allocator=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_allocator-7bd5dd0e5d7e665b.rmeta --extern ink_prelude=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_prelude-fe02af96d9c1a41f.rmeta --extern ink_primitives=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libink_primitives-af0779333659cd36.rmeta --extern num_traits=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libnum_traits-0287077476295f65.rmeta --extern scale=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libparity_scale_codec-c6fe4327fe0b8996.rmeta --extern paste=/ci-cache/ink/targets/master/clippy-wasm/debug/deps/libpaste-e38a6a68334ba7ca.so --extern sp_arithmetic=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libsp_arithmetic-eb1a2aee638f99de.rmeta --extern static_assertions=/ci-cache/ink/targets/master/clippy-wasm/wasm32-unknown-unknown/debug/deps/libstatic_assertions-545794effdedec3d.rmeta` (exit status: 101)
Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
spellcheck Workspace
     |
918 | ..CustomEnvironment` which defaults to ink!'s `DefaultEnvironment`
| ^^^
| - E's, S's, I's, A's, N's, R's, T's, or one of 9 others
|
| Possible spelling mistake found.

Cleaning up file based variables
ERROR: Job failed: exit code 1
failed
clippy-std Workspace
query stack during panic:
#0 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `ink_env`

Caused by:
process didn't exit successfully: `sccache /usr/local/rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/clippy-driver rustc --crate-name ink_env --edition=2018 crates/env/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="blake2"' --cfg 'feature="default"' --cfg 'feature="ink-debug"' --cfg 'feature="ink-experimental-engine"' --cfg 'feature="ink_engine"' --cfg 'feature="ink_metadata"' --cfg 'feature="rand"' --cfg 'feature="scale-info"' --cfg 'feature="sha2"' --cfg 'feature="sha3"' --cfg 'feature="std"' -C metadata=775dbf70707529d7 -C extra-filename=-775dbf70707529d7 --out-dir /ci-cache/ink/targets/master/clippy-std/debug/deps -L dependency=/ci-cache/ink/targets/master/clippy-std/debug/deps --extern arrayref=/ci-cache/ink/targets/master/clippy-std/debug/deps/libarrayref-8b0492b6c718a608.rmeta --extern blake2=/ci-cache/ink/targets/master/clippy-std/debug/deps/libblake2-b9939d8138175bc0.rmeta --extern cfg_if=/ci-cache/ink/targets/master/clippy-std/debug/deps/libcfg_if-621b92c8c202d759.rmeta --extern derive_more=/ci-cache/ink/targets/master/clippy-std/debug/deps/libderive_more-bb2cca2b152bc737.so --extern ink_allocator=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_allocator-3d4bf08dda0251e3.rmeta --extern ink_engine=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_engine-f1bb7945744f8c0d.rmeta --extern ink_metadata=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_metadata-d90b7b96aaa1fb2a.rmeta --extern ink_prelude=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_prelude-5263146abd2fdffa.rmeta --extern ink_primitives=/ci-cache/ink/targets/master/clippy-std/debug/deps/libink_primitives-be1b5b0a148d1a5f.rmeta --extern num_traits=/ci-cache/ink/targets/master/clippy-std/debug/deps/libnum_traits-164152519441692e.rmeta --extern scale=/ci-cache/ink/targets/master/clippy-std/debug/deps/libparity_scale_codec-076e4ee0099cd52b.rmeta --extern paste=/ci-cache/ink/targets/master/clippy-std/debug/deps/libpaste-e38a6a68334ba7ca.so --extern rand=/ci-cache/ink/targets/master/clippy-std/debug/deps/librand-4eaee687b84da4bf.rmeta --extern scale_info=/ci-cache/ink/targets/master/clippy-std/debug/deps/libscale_info-43001ece80acec57.rmeta --extern sha2=/ci-cache/ink/targets/master/clippy-std/debug/deps/libsha2-4f763afe1773168b.rmeta --extern sha3=/ci-cache/ink/targets/master/clippy-std/debug/deps/libsha3-441d27c18c4994d7.rmeta --extern sp_arithmetic=/ci-cache/ink/targets/master/clippy-std/debug/deps/libsp_arithmetic-2cbb109db6077f15.rmeta --extern static_assertions=/ci-cache/ink/targets/master/clippy-std/debug/deps/libstatic_assertions-b8fd312976fd468b.rmeta` (exit status: 101)
Cleaning up file based variables
ERROR: Job failed: exit code 1