red-brick: Add all useful Linux file open flags to the file object API
red-brick: Turn inventory into an object to avoid global state

Before, the current iteration indices of the inventory were global. This
doesn't work well with more than one client iterating the inventory at
the same time.

Now, the current iteration index is part of the inventory object state.
Multiple client can use their own inventory objects to iterate the objects
without interfering with each other.