rospy: use threading module rather than thread

This is a reopening of #284.