The file descriptors made by MT_lockf were leaked.  This was no problem given the usage by GDK itself, but for an application that constantly checks the locks this is not nice.  Changed the function such that it returns the file descriptor if the lock succeed, and closes it if it doesn't.  Also changed the windows version accordingly.
The file descriptors made by MT_lockf were leaked.  This was no problem
given the usage by GDK itself, but for an application that constantly
checks the locks this is not nice.  Changed the function such that it
returns the file descriptor if the lock succeed, and closes it if it
doesn't.  Also changed the windows version accordingly.

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