Physics potential of the International Axion Observatory (IAXO)