Merge pull request #1033 from hurtonm/master

Finish ERROR handling for PLAIN mechanism
Merge pull request #1034 from hurtonm/master

NULL: Correct ERROR command format
Prefix error-reason with length in ERROR command