Ferret: An Efficient Online Continual Learning Framework under Varying Memory Constraints