fifo: improve blocking and hysteresis

Work-in-progress to eventually allow the application to independently
specify whether or not each index (both front and rear) is also treated
as a futex, and if so whether it is single-process or multi-process.
This involves replacing mIsPrivate by an enum for futex types.
Still to do:
 - provide an API to configure this
 - better testing

Continued work on the setHysteresis() API.
Still to do:
 - better testing and debugging, especially for the read side.
 - do the right thing based on data currently in the buffer

Added available() API to return the number of frames that could
be obtain()ed.  For reader, this is the fill level.

Miscellaneous:
 - renamed sharedRear to writerRear
 - improved Doxygen comments
 - address code review comments by explaining why some paramters are
   passed by reference and some as pointers
 - updated tests
 - fixed bug: iovec was not being clear on error
 - changed default value of throttlesWriter to true

Test: tests/fifo_*
Change-Id: I0e19052abc90453ca48a0299d2c2de62468de6cb
5 files changed