mapi: only send Xclose when this is necessary
mapi: only send Xclose when this is necessary

The server only keeps results which it cannot fully send in the initial
response to the client's query.  Hence we only need to send an Xclose
command for results where the initial tuplecount is smaller than the
total rowcount.  Store the tuplecount for this reason, and evaluate it
when we're about to close the result, so we don't send needless Xclose
commands to the server.

zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb,zyzyis/monetdb