esp_netif_init() returns standard esp_err_t error code (unlike tcpip_adapter init), so shall be checked for the return value
Also to make the initialization code more consistent.
1) WEB_PATH should path relative to document root of web server.
2) HTTP request should contain "Host" header of format "host:port".
3) Port number in the example should be configurable.
request new lines must be `\r\n` as specified in the HTTP RFC.
Also the following logic checks for the socket to be closed by the server. This only happens with HTTP/1.0 not HTTP/1.1. So I have adjusted the protocol in the request, too.
* Use "example" in all example function & variable names,
ie use i2c_example_xxx instead of i2c_xxx for example functions.
Closes#198https://github.com/espressif/esp-idf/issues/198
* Mark example functions, etc. static
* Replace uses of "test" & "demo" with "example"
* Split the UART example into two
* Rename "main" example files to end with "_main.c" for disambiguation