Move code from valfile.hh to valfile.cc
Nits in dwgrep.txt
Restructure valfile and related interfaces

- The goal here is to reduce the amount of copying and heap
  allocations.  value_ref's are now reference wrappers, and value's
  are containers that can be used to prime valfile's slots.