First pass to port to JS files

As we spoke on the #227 thread, here the first batch of JS files ported from coffee files. I hope this is of any use as a start. 

Signed-off-by: Alessandro D'Aquino (elara) <alex@midokura.com>