re-implement inherits non-destructively

(didn't include 'super_', which util.inherits sets, because it's not used in this file - http://nodejs.org/docs/latest/api/util.html#util_util_inherits_constructor_superconstructor)