Conformational switching and fibrillogenesis in the amyloidogenic fragment of apolipoprotein A-I.