He has been jailed, tracked and threatened by China’s government. What was it like pay a visit home? As he publishes a polemic about surveillance and state control, the artist relives a momentous trip ...