Tuning for performance.

- Improved memorize function to minimize the number of hashtable
  queries.

- In deltaPrefix of ExtendedDAStructure, added back multiplying
  outside to see that it is nonzero. This likely improves performance
  in large genus cases.