Drugstores remain an important fixture of the U.S. health-care system that tens of millions of Americans rely on, but they may need to reinvent themselves.