Several towns on Australia's east coast were declared disaster zones after flash floods stranded thousands of people and forced hundreds to be evacuated.