Adds `Enumerable#flatten_as` that is like `flatten` with compile time control over what is flattened.