add Addon.prototype.isEnabled for an addon to exclude itself from the tree

closes #2269
`environment` being undefined here should not prevent `isEnabled` from being called.