[common] switch from unique_lock to lock_guard

To simplify working with STL synchronization primitives, this patch
changes from std::unique_lock to std::lock_guard where appropriate.
In addition, IWYU and ClangTidy's feedback has been addressed.

Change-Id: I72d86ca730113ec0652154d5ce509fc2e479befb
Reviewed-on: http://gerrit.cloudera.org:8080/21414
Tested-by: Alexey Serbin <alexey@apache.org>
Reviewed-by: Zoltan Chovan <zchovan@cloudera.com>
Reviewed-by: Abhishek Chennaka <achennaka@cloudera.com>
14 files changed