added test-connection.lua; added refragmenter for fragmented json messages; fixes in connection.lua