fix more ssh channel issues

In logs that were provided to me phpseclib sent a packet that was 2536 bytes long (excluding the bytes denoting the channel and data length) but the length packet said it was 32764 bytes long (ie. $max_size).

So when $max_size is less than the data being sent and has to be adjusted by a new window adjust message from the server and the adjustment makes $max_Size bigger than the data being sent over problems arise.

SSH's window size has caused issues before. Overall I don't think the SSH specs really explain the window size very well. I opened up an errata on SSH's RFC a while back about the issue.
Merge pull request #297 from terrafrost/ssh-channel-fix-2

fix more ssh channel issues

* terrafrost/ssh-channel-fix-2:
  fix more ssh channel issues
Merge branch 'master' into php5

* master:
  fix more ssh channel issues