Republican McCarthy was finally elected Speaker of the US House of Representatives