Brazil closes, then reopens border to Venezuelan migrants