bindings/python: implement Threads().__nonzero__