Camera: Fix metadata data alignment, other minor bugs.

- When a metadata entry needs to overflow into the data buffer, make
 sure the starting offset is aligned to the maximum needed by all the
 metadata types.
- Bounds check the data buffer size when adding a new entry
- Add new test for the bounds check
- Print out doubles correctly.

Bug: 7498597

Change-Id: Ic8645a998c096f5b803839ee8076b97862127021
Camera: Actually make camera_metadata memcopyable

- Use internal offsets instead of pointers for the entry and data
  arrays.
- Add test to verify memcpy works and doesn't alias data.
- Remove support for forward-compatible reserved space handling, given
  that it's unlikely to be useful

Bug: 7546079
Change-Id: I439aa27fed8d243b7a04155daf5e58fa1c4c730e
Camera2: Fix metadata alignment for double and int64 types

* camera_metadata_rational_t was only aligning to 4 bytes, we need to align to 8
* add an automated unit test to verify alignment for each type of data

Bug: 7498597
Change-Id: Ib5554d412e09b95d21933b6015db68d01a072f90
Merge android-4.2.2_r1 into dev-mips-jb-mr1