Bifunctionality of a biofilm matrix protein controlled by redox state