Query CompilationDatabase right before running each compilation.

Summary:
Query CompilationDatabase right before running each compilation. This allows
supporting compilation databases that change external state required for
successful compilation.

Reviewers: klimek, djasper

Reviewed By: djasper

Subscribers: klimek, cfe-commits

Differential Revision: http://reviews.llvm.org/D5086

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@216620 91177308-0d34-0410-b5e6-96231b3b80d8