add _valid_formatter
add _valid_formatter

for determining whether a method is valid

should properly reject unbound methods of both compiled and Python classes, and allow any other Python callable.

ipython/ipython,ipython/ipython