Fix memory tuple binding leak when calling tuplestore_putvalues for tuplestore.
Fix memory tuple binding leak when calling tuplestore_putvalues for tuplestore.

For instance, the simple query:
create table spilltest2 (a integer);
insert into spilltest2 select a from generate_series(1,40000000) a;
Current optimizer would generate FunctionTableScan for generate_series, which stores
result of generate_series in tuple store. Memory leak would happen because memory tuple
binding will be constructed every time in tuplestore_putvalues. It is not only memory leak
problem, also performance problem, because we don't need to construct memory tuple binding
for every row, but just once. This fix just change the interface of tuplestore_putvalues. It
will receive memory tuple binding as input, which is constructed once outside.

Signed-off-by: Xiaoran Wang <cfd6c5e9915854df7dc714e3622701ef0598b878@pivotal.io>

lisakowen/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,jmcatamney/gpdb,lisakowen/gpdb,edespino/gpdb,adam8157/gpdb,jmcatamney/gpdb,edespino/gpdb,yuanzhao/gpdb,yuanzhao/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,lisakowen/gpdb,Chibin/gpdb,Chibin/gpdb,50wu/gpdb,jmcatamney/gpdb,edespino/gpdb,50wu/gpdb,adam8157/gpdb,lisakowen/gpdb,50wu/gpdb,50wu/gpdb,xinzweb/gpdb,50wu/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,ashwinstar/gpdb,edespino/gpdb,greenplum-db/gpdb,xinzweb/gpdb,lisakowen/gpdb,Chibin/gpdb,jmcatamney/gpdb,lisakowen/gpdb,ashwinstar/gpdb,Chibin/gpdb,xinzweb/gpdb,xinzweb/gpdb,jmcatamney/gpdb,Chibin/gpdb,edespino/gpdb,ashwinstar/gpdb,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,lisakowen/gpdb,yuanzhao/gpdb,xinzweb/gpdb,lisakowen/gpdb,ashwinstar/gpdb,edespino/gpdb,edespino/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,adam8157/gpdb,Chibin/gpdb,ashwinstar/gpdb,yuanzhao/gpdb,adam8157/gpdb,yuanzhao/gpdb,50wu/gpdb,50wu/gpdb,Chibin/gpdb,Chibin/gpdb,yuanzhao/gpdb,edespino/gpdb,jmcatamney/gpdb,Chibin/gpdb,adam8157/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,adam8157/gpdb,edespino/gpdb,ashwinstar/gpdb,Chibin/gpdb,edespino/gpdb,adam8157/gpdb,xinzweb/gpdb,yuanzhao/gpdb,greenplum-db/gpdb,ashwinstar/gpdb