propagated Niels' fixes from the MonetDB_4-3-16 branch: allways call close in close_stream
propagated Niels' fixes from the MonetDB_4-3-16 branch:
allways call close in close_stream

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