The speaker of Georgia’s parliament said he gave the final endorsement on Monday to a divisive “foreign agents” bill that has prompted weeks of protests by critics who say it will restrict media freedom and jeopardize Georgia’s chances of joining the European Union.