New code from lwip project

lwip repo:
e4ddd6c Multiple fixes found by coverity scan

lwip-contrib repo:
993d8c8 fixed compiling port/win32 for C++
0007b4e Multiple fixes found by coverity scan