IOIOLib: Add sequencer support

This change exposes the Sequencer API in IOIOLib.
Some misssing copyright messages.
Random whitespace and import cleanup.
software: Added a HelloSequencer example

This demonstrates the basic use of the Sequencer API.
firmware: Add SYNC command

This command does nothing, but is echoed.
Can be used by the client to sync incoming and outgoing data.
IOIOLib: Add some synchronization features

The API has been enhanced with features that enable reasoning about the
ordering of various I/O operations:
- IOIO.sync() will block until a round-trip to the IOIO has been completed.
  This guarantees that any data arriving after the call has been generated
  after any data sent before the call.
- All the interfaces that expose async reading of data have been enhanced
  with a sync version, which guarantees to wait for fresh data before
  returning.

Together, these API enhancements allow asserting that a certain reading has
been acquired before another reading, or after an output has been asserted.
Torture test: Minor fixes

- Add a wake lock.
- Fix a bug in histogram aggregator (which caused wrong readings on the
  latency histogram.
IOIOLib: Handle protocol errors gracefully

So far, only illegal command bytes have been used to indicate input data
corruption. However, it is more correct to treat any sort of exception as
such an indication.
IOIOLib: Cleanup resource life-cycle pattern

Extracted a class for a resource's life-cycle from AbstractResource and
added a convenience method for wait()ing, while checking the state. This
cleaned up a bunch of client code. Also, this now guaranteed that close()
will release any blocking calls with InterruptedException.
IOIOLib/IOIODude: Upgrade to PJC 0.0.21 / JNA 4.0.0

The latest versions have some substantial bugfixes, mostly on Linux.
We no longer need the hack for working around the failure to unblock the
reader while closing.

Updated both IOIOLibPc and IOIODude.
IOIOLib: Increase version to IOIO0500
firmware: Upgrade btstack to r2027

The main purpose of this upgrade was to add the CoD report, with the hope
that some Android devices which reject the CoD of 0 (misc.) will now see
the IOIO.
As a side-effect, this version of btstack supports some new features, and
mainly SSP (secure simple pairing).
Since the IOIO doesn't have either a display nor a keyboard, the only
possible pairing option is "Just Works", which lacks authentication. I
opted to disable SSP for the time being, but it is not easy to turn on.
bootloaders / BLAPI: Bug in address map

It turns out that there was a bug in both the bootloader and the app linker
scripts, which allowed the app image to extend to the bootloader settings
page, and hence erase the settings when programmed.
This would only have been felt if the app firmware actually used this page,
which until now hasn't happened.
While this could be considered a BLAPI change, I'm considering it an
implementation bug and not updating the BLAPI version number.
After this fix, both the app linker script and bootloaders now enforce that
the app doesn't extend into the last page.
IOIOLib: Flush output

Although in practice the output stream is unbuffered, nobody guarantees
that.
IOIOLib: Cleanup connection buffering design

Each connection type knows best how much buffering to put on its
streams. IOIOProtocol no longer does any buffering and relies on flush()
of the output to do the right thing.
Added reasonably sized buffers around the streams in all connetion
types.
IOIOLibAccessory: Support either new or legacy USB

Some Android devices support USB accessory using the new API
(android.hardware.usb) and do not have the adapter for the legacy API
(com.android.future.usb).
Modified IOIOLibAccessory to be able to work with either one.
Software: Some manifest cleanup

Some manifests were missing <uses-feature>, and a few more nits.
software: Use manifest-merger

No longer need to declare the uses-permission and uses-feature at the
app level. Instead, we can merge those in from the library manifests.
Software: More convenient .gitignore

It seems that ADT no longer freaks out if bin and gen do not exist. So
we can simply get rid of them.
Software: Fully-automated software release

Finally!
tools/make-software-release now builds the entire software bundle from
scratch with no intervention.
It requires using the patch in tools/android_build_xml.diff against the
android SDK.