CAMI: A Counselor Agent Supporting Motivational Interviewing through State Inference and Topic Exploration