Fix clang-tidy warnings in bootable/recovery.

* Use const reference type for read-only parameters.
Bug: 30407689
* Use faster overloaded string find function.
Bug: 30411878
* Add parentheses around macro parameters.
Bug: 28705665

Test: build with WITH_TIDY=1
Change-Id: I4e8e5748bfa4ae89871f1fb5fa4624d372530d75
diff --git a/wear_touch.cpp b/wear_touch.cpp
index f22d40b..51a1d31 100644
--- a/wear_touch.cpp
+++ b/wear_touch.cpp
@@ -122,7 +122,7 @@
     return NULL;
 }
 
-#define test_bit(bit, array)    (array[bit/8] & (1<<(bit%8)))
+#define test_bit(bit, array)    ((array)[(bit)/8] & (1<<((bit)%8)))
 
 int WearSwipeDetector::openDevice(const char *device) {
     int fd = open(device, O_RDONLY);