Online Resource Allocation for Edge Intelligence with Colocated Model Retraining and Inference