THRIFT-2169: JavaME Library causes "java.io.IOException: No Response Entries Available" after using client for some time
Client: javame
Patch: Omkar Aradhya K S

Ensures the connection is closed. Also added spacing cleanup.