Implement `respondsTo` in `Object`, `StaticObject` and child classes.

Fixes #806