Added the onlog callback to the ww. Can be used by whoever is
using the ww to ascertain progress, etc. In NDTjs the logger now
sends messages to that callback too.
Add onopen,onerror and onclose event handlers to NDTjs. The first
two are trivial, but onclose tries to analyze the close event and
produce some useful messages, especially in the case of abnormal
websocket closure.