Bug #385 http://bugs.skysql.com/show_bug.cgi?id=385
dcb.c:dcb_write accept also dcb state DCB_STATE_NOPOLLING since it only means that dcb has been removed from epoll set but it is still possible to write to it.

Bug #384 http://bugs.skysql.com/show_bug.cgi?id=384
session.h:added new state for SESSION, SESSION_STATE_ROUTER_READY which follows SESSION_STATE_READY. The difference is that ROUTER_READY is set only after router session is successfully created while READY means that session still lacks router.
session.c:set SESSION_STATE_ROUTER_READY when router is created.
mysql_backend.c:gw_read_backend_event, added SESSION_STATE_ROUTER_READY check before router session is closed. Changed chec kso that it doesn't block in infinite loop (although it shouldn't be possible anyway).
mysql_backend.c:gw_error_backend_event, added similar check before session is closed.