Five decades ago, “M*A*S*H” anticipated today’s TV dramedies, showing that a great comedy could be more than just funny.