altos: Fix ao_delay function and move from per-chip code to ao_task.c