big change.  added context arg to logic.perform

and implemented auto-cloning of logic, and fluent perform result.  this
avoids context data issues under multithreading