Refinements to filesystem and mmap

This is a *DRAFT* pull request that aims at demonstrating the ideas and making discussions more concrete. There could be lots of refinements to be done. Would you please give me some suggestions?

One known problem is that valloc() is sometimes not included. This breaks the testcase:  test_mmap_file. Should we always include dlmalloc or write a simple static valloc()?