Make fuse inode logic more testable + add tests.

The main purpose of this change is to abstract away all of the
internal book-keeping behind a "node" class, so that its logic
is well encapsulated and easier to test.

This refactor revealed a few bugs / issues which have been addressed:
- The fuse inode counter wasn't actually being used anywhere, so we
  can get rid of it.
- node->nid, node->ino don't store any useful information so this change
  gets rid of them.
- CloseAllOpenFds is supposed to close open FDs but doesn't actually do
  so, it only deletes the nodes associated with the FD.
- Removing the distinction between the root being stack allocated and
  every other node being heap allocated simplifies the code
  significantly.

Test: atest FuseDaemonHostTest
Test: atest node_test

Change-Id: Ia1800258efd236820406bdfb211882aa6ecaca46
5 files changed