transform: transforms `while` and `for`

Signed-off-by: Jean Privat <jean@pryen.org>