Applied a patch from Marc Boucher which has the following changes:
1) Fixed sys_arch.txt documentation to have new return type from
sys_thread_new.
2) Removed unnecessary casts on calling sys_timeout() in certain files.
3) Removed some unnecessary break statements after return statements.
4) Changed sys_timeout_remove() to sys_untimeout().
5) Added some forgotten #ifndef SYS_LIGHTWEIGHT_PROT to memp.c
6) Changed LWIP_DIAG and LWIP_PLATFORM_ASSERT to have do while().