Authorities declare state of emergency, warn that dam could give way as floods sweep away cars and destroy buildings