make `hasListeners` a class function

rather than an instance method
implement inheritance for light.js
tidy
docs