try close method to close FDs in IOLoop

If an object has a `close` method, use that first,
then fallback on `os.close`.

This is useful in subclasses that support polling things (zmq sockets, specifically)
that are not simple FDs (and Jython, I hear?).
use getattr to check for close method in IOLoop.close

instead of catching AttributeError directly