Fighters allied to Libya’s U.N.-backed government posted selfies from a barracks one day last month to mark their progress in a battle for Tripoli.