Make RawAddress into a class (2/3)

* Add libbluetooth-types - library containing types implementation, that
is common between stystem/bt and packages/apps/Bluetooth. It must be
included in every project using btif interface.
* Put Raw Address implementation into libbluetooth-types
* Unify all "to/from string" helper methods into ToString and FromString
* bd_addr_empty -> RawAddress::kEmpty
* bd_addr_any -> RawAddress::kAny

Also fix leaks in jni str2addr by adding ReleaseStringUTFChars

Test: types_unittest
Change-Id: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
Merged-In: I2a0eb8d50ff777f494eed26bd58b5c502d2a0716
diff --git a/include/hardware/bluetooth.h b/include/hardware/bluetooth.h
index 119c35d..9fd91cb 100644
--- a/include/hardware/bluetooth.h
+++ b/include/hardware/bluetooth.h
@@ -24,6 +24,8 @@
 
 #include <hardware/hardware.h>
 
+#include <raw_address.h>
+
 __BEGIN_DECLS
 
 /**
@@ -55,11 +57,6 @@
 /** Bluetooth test interface IDs */
 #define BT_TEST_INTERFACE_MCAP_ID "mcap_test"
 
-/** Bluetooth Address */
-typedef struct {
-    uint8_t address[6];
-} __attribute__((packed))RawAddress;
-
 /** Bluetooth Device Name */
 typedef struct {
     uint8_t name[249];