Issue title: cquery process consumes 100% when it can't find locate compile_commands.json
 Issue body: h5. Steps to Reproduce

* Using `emacs` and `emacs-cquery` as of https://github.com/cquery-project/emacs-cquery/commit/e8f88bb4251372c3834c7194819507cc80120ef0, open a C/C++ source file in a clean version-controlled repository (no `compile_commands.json` or `.cquery`)

h5. Expected Results

`cquery` doesn't start or, if it does start, exits with an error code.

h5. Actual Results

`cquery` splats the following log and pegs the CPU:

```
LIBCLANG TOOLING ERROR: json-compilation-database: Error while opening JSON database: No such file or directory

2018-03-03 12:04:50.773 (   0.001s) [querydb      ]        project.cc:310   WARN| cquery has no clang arguments. Considering adding either a compile_commands.json or .cquery file. See the cquery README for more information.
```

```
$ top
top - 12:14:06 up  1:37,  2 users,  load average: 1.01, 0.90, 0.50
Tasks: 138 total,   2 running, 136 sleeping,   0 stopped,   0 zombie
%Cpu0  : 75.1 us, 24.9 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  1.0 us,  0.3 sy,  0.0 ni, 98.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.7 us,  0.3 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   6115168 total,  4529100 used,  1586068 free,      876 buffers
KiB Swap:  5310460 total,        0 used,  5310460 free.  1919372 cached Mem

   PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND                                                                                                      
  7856 josh      20   0  389264  20328  15508 R  99.8  0.3   9:15.65 querydb                                                                                                    
```
 Comments: 
 Comment 0: can you have a --variant=debug build and use a debugger to see what main thread (gdb thread 1) is doing?
 Comment 1: [pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
[pid  4639] getcwd("/home/trevorj/Documents/PlatformIO/Projects/led-shoes", 1024) = 54
{'source': 'GithubIssues', 'repo_name_with_owner': 'cquery-project/cquery', 'issue_id': 302028623, 'repo_stars': 1616.0}