replace all endless for loops by while

issue: https://github.com/RIOT-OS/RIOT/issues/686