Altered dynamics of brain connectivity in major depressive disorder at-rest and during task performance