Brooks Brothers, which bills itself as the oldest retailer in the U.S., is converting three factories, including one in Massachusetts, into a producer of medical supplies.