A Novel Ferroelectric FET based Multibit Content Addressable Memory with Dynamic and Static Modes for Energy-Efficient Training and Inference