fixed track by index for messages in chat2 & typescript d.ts for tcp and udp

TESTED: grunt test & manual test of peer-connection chat2 demo 
agreed. This was commented out pending a fix to typescript (#52) that breaks a certain style of module name-spaces. But we actually have a bigger question here which is how to name typescript interfaces for Freedom. At the moment we're using `freedom_MODULE_NAME.INTERFACE_NAME` and then using import declaration to abbreviate the long module name. e.g. `import TcpLib = freedom_TcpSockets` so we can write `TcpLib.Socket` instead of `freedom_TcpSockets.Socket`. I'll submit this for now, and file issue for resolving how we name these things.