Lifelong Learning with Monolithic 3D Ferroelectric Ternary Content-Addressable Memory