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.
We typically don't use the 'k' prefix for enums/constants. Seeing as though this is C++11, you could do:
enum class SomeEnum {
  Foo,
  Bar
};

and then use SomeEnum::Foo below.