mysql_client.c:gw_error_client_event & gw_client_hangup_event: added session state check, if session is already closing, don't start redundant call to dcb_close.
mysql_common.c:mysql_protocol_done: added protocol state check. Used not to check it which caused double free of allocated memory.
Merge branch 'release-1.0beta' of https://github.com/skysql/MaxScale into release-1.0beta