master: Place static variables in filesystem.cc in one place

Reorganize the code in filesystem.cc to keep all the static variables in
one place to make it easier to wrap them in a struct.

Change-Id: I36576a7e1efc866745a5a34d27d7089c1c3ef631