some code reorganization in preparation for non-blocking read and write
operations.
fortran: add missing bindings for WIN_SYNC, WIN_LOCK_ALL,
WIN_UNLOCK_ALL

cmr=v1.8.2:reviewer=hjelmn