A judge has initiated a federal court takeover of California’s troubled prison mental health system by naming the former head of the Federal Bureau of Prisons to serve as receiver, giving her four months to craft a plan to provide adequate care for tens of thousands of prisoners with serious mental illness.