Support logcat v2 and v3 headers

Lollipop uses logcat header logger_entry_v2 (or logger_entry_v3, which
is binary compatible) by default. Add support to parse both formats in
addition to the existing v1 format. The extra information contained in
v2 and v3 as compared to v1 is silently discarded.

Also add more test content, grabbed from a Nexus 5 running the latest
Lollipop developer preview.
Refactor: rename logcat -> adb

logcat.c will encompass more adb functionality than just logcat. Rename
accordingly.
Improve adb encapsulation

Introduce a proper wrapper for adb. Responsibilities of this wrapper
include:

  - Government of the adb logcat process' life cycle (or, for testing
    and debugging purposes, the appearance thereof).

  - Control of the logcat stream, such as pausing and resuming reading
    when a device is temporarily disconnected.

  - Forwarding of adb shell commands to the device.

Some of the above bullets are only planned at this point in time, and
are not part of this commit.

This commit moves liblokatt's main thread from demux.c, where it used to
route data between adb logcat and clients of the library, to adb.c where
it reads the adb logcat stream. Parsed logcat messages are made visible
to the rest of the library via a callback function. This makes the
select(2) loop obsolete: different parts of liblokatt are now
synchronized using pthread primitives only.
destroy_lokatt_channel: fix memory leak

Add missing call to destroy_ring_buffer_iterator when tearing down a
lokatt channel.