clatd: Add clang-format style config and pre-upload hook.

Copied from system/netd, but with modifications to fit
existing coding style.

Bug: 118848635
Test: 1. build all
      2. atest clatd_test
      3. clang-format --style file -i *.{c,h,cpp}

Change-Id: Iedc7cb149ad117615b1dcf9488fbf160294c9bb0
diff --git a/.clang-format b/.clang-format
new file mode 100644
index 0000000..6682f77
--- /dev/null
+++ b/.clang-format
@@ -0,0 +1,11 @@
+# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
+# Please keep this file in sync with system/core/.clang-format-4
+#
+BasedOnStyle: Google
+AlignConsecutiveAssignments: true
+AlignEscapedNewlines: Right
+ColumnLimit: 100
+CommentPragmas: NOLINT:.*
+ContinuationIndentWidth: 2
+Cpp11BracedListStyle: false
+TabWidth: 2
diff --git a/PREUPLOAD.cfg b/PREUPLOAD.cfg
new file mode 100644
index 0000000..c8dbf77
--- /dev/null
+++ b/PREUPLOAD.cfg
@@ -0,0 +1,5 @@
+[Builtin Hooks]
+clang_format = true
+
+[Builtin Hooks Options]
+clang_format = --commit ${PREUPLOAD_COMMIT} --style file --extensions c,h,cc,cpp