Greece’s parliament approved on Friday a bill to protect borrowers from foreclosures on their primary homes after tense negotiations with the country’s international creditors.