Rename variables with more explicit names

- pending -> queuedTasks
- ticking -> pendingTicks
- maxTicking -> maxPendingTicks
- cycle -> usedTicks
- n -> expectedTicks