Servicemanager interfaces for libhwbinder.

Main difference between the hardware servicemanager
and the binder servicemanager is that the former supports
versioned interfaces. For now, support registering a single
supported version per interface, on the assumption that
interfaces with a different major version require a different
implementation (and hence a second call to register).

Switch ProcessState to start using /dev/hwbinder.

This also makes IPCThreadState::setTheContextObject() a
valid method for registering yourself as the servicemanager
again. In "plain" binder, this method was not used, because
the servicemanager for binder doesn't link against libbinder
at all.

Note that while any process can calls this method, it's useless
without also being able to tell the kernel driver that you are
the servicemanager. Since that will be SELinux protected, there's
no further need to protect this call.

Change-Id: If9bfb0305d16010788942aaca7ee1279aea88135
6 files changed