It’s a lousy time to work in a drug lab, but the pink slips handed out to tens of thousands of pharmaceutical industry employees may have a silver lining for investors. Even as drugmakers cut research and development (R&D) budgets, there are tentative signs that the flow of new medicines is improving, potentially pointing to a long-awaited improvement in research productivity. The $850-billion-a-year industry still doesn’t have nearly enough new drugs to replace all those facing generic competition in the biggest wave of patent expirations in history.