Make generator::make_function() accept functors by rvalue references