Donald Trump officially clinches the Republican nomination for US president as speakers attack Hillary Clinton on day two of the party convention.