Kevin McCarthy elected speaker of the house