More typescript comments and cleanup

* More comments for freedom-apis
* Abstracted out on/emit interface. 
* Treating ChannelEndpointIdentifier as an empty interface; it at least has its own label now. Sadly typescript doesn't support type-abstraction. 
* Added close to Channel objects.