The Greek parliament failed again to elect a new president, bringing closer the possibility of snap elections that could hand power to a popular anti-austerity party.