The JSON compilation database allows specifying arguments either as an
array of string ("arguments") or as a single shell-escaped string
("command"). When using "command", we were hitting very slow load times
for large compilation databases. This commit speeds up splitting the
shell-escaped command by not iterating the UTF-8 view instead of the
graphemes.
In release builds I see ~10x speedup of the splitting perf test, and
~3-5x in a debug build. In a real-world test using the cmake-generated
compile_commands.json for llvm+clang this sped up overall compilation
database loading from 11 seconds to 1.2 seconds on my machine.
Find the index store path by searching through the command-line
arguments, and if found, also provide a default database path next to
the index store. Also add command-line arguments so that either of these
can be overridden. We could also easily add these as initialization
options if an LSP client wanted to provide them in the future.