Add Generator class and support code

Generator is intended to be the preferred way to encapsulate Func building in user pipelines. This pull request probably could use more documentation, but the overall design and set of tests is solid enough to begin serious discussion.
I'd vote for user_assert, or for clamping plus use_warning. I see min/max values for parameters mainly as a form of documentation, so silently clamping doesn't really help anyone.