Add commands for checking whether a object has an attribute/method

Targets #442.

Please review.
Maybe `ws_builtin_cmd_has_meth` would be better