Prince Andrew’s damaged reputation led to links with Chinese man accused of spying, documents show