AI coding tools charge by the token, the minute, or the month. Here's how each one works — and how to avoid the surprise bill.