Clean up and refactor; new hw support

(Originally, https://android-review.googlesource.com/#/c/341550/)

This change addresses portability, a pn80t platform abstraction, and
nq-nci support.

Refactor/clean up:
- Adds darwin-sysdeps.c to help avoid reverting again.
- Clean up Android.bp
- T=1: moved T=1 to using bit_specs to keep some
  of the readability of bitfields without incurring
  weird toolchain side effects.
- T=1 will still rely on compilers keeping uchars
  aligned and check it with a div-by-zero build
  assertion.
- ESE platform specific methods are now wrapped.
- Adjusted error message constant usage.
- Enclosing {} for every if statement.
- Moved to relative headers for inclusion into other code
  bases.
- Added a comment to log.h to make debugging easier globally
  in libese code.

PN80T:
- Common code now shared across different
  wire configurations.
- Add support for kernel based driver (called nq-nci)
  which interacts with the nq-nci behavior for power
  management.
- Added cooldown/end of session code to pn80t/common.c
- Migrated the ese_nxp_sample code to NQ_NCI and added the empty
  session to test the cooldown code submission.

Bug: 34193473,35105409
Change-Id: I8fc320c8c236282ed103ef3ee3cb8c0dc99d8bcb
Test: unittests pass, tested ese-relay on hardware forwarding globalplatform pro
diff --git a/libese-sysdeps/darwin-sysdeps.c b/libese-sysdeps/darwin-sysdeps.c
new file mode 100644
index 0000000..5cfb447
--- /dev/null
+++ b/libese-sysdeps/darwin-sysdeps.c
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <stdint.h>
+#include <string.h>
+
+void *ese_memcpy(void *__dest, const void *__src, uint64_t __n) {
+  return memcpy(__dest, __src, __n);
+}
+
+void *ese_memset(void *__s, int __c, uint64_t __n) {
+  return memset(__s, __c, __n);
+}