Log command ids.

Summary:
Associate command ids with thread ids so that it is clear
which messages are logged by a given command in the case where
multiple commands are executing concurrently.

Test Plan:
1) buck test --all
2) check that log messages in buck-out/logs are annotated with command ids
Fix regression: targets referenced in genrule() cmd should be included as deps.

Test Plan: Add regression test.