Fixes for adopt-rule and adopt-rules.
Efficiency improvements.
Added find-term-with-subst-applied.
Fixed bug in filter-fn.
Added specificInstanceOfGeneric? function.
Significant rewrite of generic-infer so it does less work.