[clang] Deterministic -gen-cdb-fragment-path filenames
The files written into the given target directory follow the pattern
ab.c.X.json.
Instead of X being 4 randomly generated hexadecimal chars, it is now
a deterministic hash of the input and output filenames encoded in
10 base64 chars.
This means the output directory no longer fills up with duplicates,
and concatenating the *.json files continues to generates a useful
compilation database even after the first full project build.
The output file is also hashed so that these compiler calls can be
distinguished:
clang -c ab.c -o ab.o
clang -c ab.c -D_BAR_ -o bar.o