units: simplify the next_phoneme function

This moves the logic used to read phonemes to the `read` state
machine, and renames `next_phoneme` to `find_unit` (matching the
behaviour of this function).