New unit tests and fixed uncovered bugs

I created a comprehensive testing framework for easily testing the behavior of applications using pipeline, though configuration. The tests reach 95% code coverage and test user defined rules, error conditions, and optional task configuration. While writing the tests, I uncovered a couple of bugs, the main one being that we were caching a closure containing an instance of pipeline.