Add a function to write out a custom compilation database.

psq_make_compilation_db will write a custom compilation database for
a TARGET to
${CMAKE_CURRENT_BINARY_DIR}/TARGET_compile_commands/compile_commands.json
and set the name of the containing dir in CUSTOM_COMPILATION_DB_RETURN.

Sources need to be pre-split up into C_SOURCES and CXX_SOURCES. This can
be determined by using psq_sort_sources_to_languages.

Pass INTERNAL_INCLUDE_DIRS, EXTERNAL_INCLUDE_DIRS and DEFINES to have
those put on the custom compilation database command line.
Merge pull request #4 from smspillaz/tooling-cmake-util.item_4

Add a function to write out a custom compilation database.