Casualties from the battle for Libya’s capital mounted on Tuesday while Islamic State killed three people in a desert town, illustrating how jihadists may exploit renewed chaos.