DELAY module: implementation moved from main.c to separate file

* Function "delay" reimplemented as separate module.
* Examples fixed according with new implementation.