Generic drugs don't hit the market right after patents expire. A complex mix of legal protections, patent lawsuits, and manufacturing delays can hold them back for years. Here's how the system really works.