Tensions have eased on the border between Poland and Belarus, where thousands of migrants had been stranded in freezing conditions.