Three Israeli hostages have been exchanged for 183 Palestinian detainees as the Rafah border crossing reopened for the first time in almost nine months.