Portugal’s parliament passed a four-year legislative program proposed by the government, giving Prime Minister Antonio Costa authority to govern in his second term.