Updated Proxy's user API.

1. Generated code should handle returning structs correctly.
2. Generated code now restores the stack better, using a single add
rather than a bunch of pops.