Minor cleanup of aidl.cpp

1) Move some helper functions to parse_helpers.cpp
2) Refactor some helper functions to take advantage of C++ built ins
3) Add unittest coverage of refactored logic
4) clang-format -i -style=Google parse_helpers.cpp
5) Move remaining helper functions of aidl.cpp into anonymous namespace

Change-Id: I3a2cf7be113ac7f71a1a3502b12a8ed910509546
diff --git a/Android.mk b/Android.mk
index 6b6699b..1716aab 100644
--- a/Android.mk
+++ b/Android.mk
@@ -39,6 +39,7 @@
     generate_java.cpp \
     generate_java_binder.cpp \
     options.cpp \
+    parse_helpers.cpp \
     search_path.cpp \
 
 include $(BUILD_HOST_STATIC_LIBRARY)
@@ -80,6 +81,7 @@
     ast_cpp_unittest.cpp \
     ast_java_unittest.cpp \
     options_unittest.cpp \
+    parse_helpers_unittest.cpp \
     test_main.cpp \
     tests/end_to_end_tests.cpp \
     tests/example_interface_test_data.cpp \