A molecular mechanism for transthyretin amyloidogenesis