Make std.util.reverse a struct and more memory conservative