first version of heapSat that infers folds

- heapSat_ tries to infer a bunch of folds to insert and backtrack.
- works only for very simple cases right now, where the return value
  is a reference to the root location that needs folding. in this
  case, at least, any inner folds that are required are inferred.