Optimizing message encoder a bit, making sure message decoder can handle negative length messages and validating message size to avoid killing the client due to OOM or eternal loops, fixing concurrency condition where the connection would fulfil a promise before cleaning it up making a waiting thread to think a query was still running