Some clean-up.

- Templatized writeObject()/readObject() to remove code duplication.
- Changed uint64_t arguments for handles and offsets to size_t as
  they are used as array indices and offsets in memory buffers.
- Moved binder kernel header modifications in a separate header,
  until our kernel changes are upstreamed and we can pull the headers
  into bionic.

Change-Id: Ic7ccef5258e6c9cd793affca7769236dbbf953f3
3 files changed