fifo: add shutdown state

FIFO is marked shutdown after an "impossible" error is detected.
Usually this indicate that memory has become corrupted, or incorrect use
of the API.  Once the FIFO is marked shutdown, all APIs that can return
an error code will return -EIO, and all other APIs will become no-ops.

Test: see unit tests in tests/ directory
Change-Id: I559145d613c3783a699a9ced062dd5ff3676769d
2 files changed