SAN FRANCISCO — A federal judge has approved a $415 million settlement that ends a lengthy legal saga revolving around allegations that Apple, Google and several other Silicon Valley companies illegally conspired to prevent their workers from getting better job offers.The case focused on a “no-poaching” pact prohibiting Apple, Google and other major employers from recruiting each other’s workers. Lawyers for the employees argued the secret agreement illegally suppressed the wages of the affected …