The Brighton hospital will become a teaching hospital of Boston University, switching its existing medical affiliation away from Tufts University.