Heavy rains force thousands from their homes in Brazil