Libya’s parliament ousted the country’s new prime minister in a no-confidence vote, the latest blow to hopes that political factions could agree on a government charged with restoring stability.