Simplify socks4/5_connected calling convention
Move connected flag into socks_data struct

This prepares a future commit were socks core needs to know the connected state
Don't double free data->pcb

On tcp_err, lwip already frees this.
Send socks connection reject on connect failure
Check for already empty send buffer on socks flush

Otherwise, socks_flush_socks_fin never gets called because the watermark
was already reached.