Chaperone-dependent amyloid assembly protects cells from prion toxicity