Dundee University's principal resigns days after the institution defended a £7,000 business trip he took to Hong Kong.