search: some refactoring to ease future work speeding PermanodeConstraint queries

Change-Id: Iac98a632bd40c723481f8e635a2c34780e87a408
more TODO

Change-Id: Ib43348a234a1902fa94d3d13b7e10aecb49da0e2
search: efficient in-memory scans of permanode modtimes

Change-Id: I82d34544a86cd9f3a52c2b7140dd89eac32fbfa9
corpus: start of work on AppendPermanodeAttrValues for permanode attr search

Change-Id: I969778420474e3413813bb49b1bfd095d9a12389