The Islamic State has claimed responsibility for the car bomb attack on the Italian consulate in Cairo, Egypt.