regs #147 - refactored gcs closing to be able to do emergency close from gcs_recv_thread
Merge branch 'gh147' into gh71
refs #147 fixed assertions
Merge gh71 upto 6c6e46672310680fd40839628641cde8def3f319