Retry TCP send on tcp_write failure
1. Check return value from tcp_write
2. Try sending smaller buffers if tcp_write fails
3. Additional checking in tcp_close and tcp_connect
4. Stop flashing RED led during image transfers