add README
fix bug introduced in 54e0455 - overriding toJSON
use %o in debug statement for object
do not deep extend empty object in selfToJSON
expose ctor.fromJSON to allow extending it