ftp: reconnect on read

FTP server may disconnect after some period of time when no transfer is done.

FTP protocol should reconnect and seek to last position.
ftp: enhanced status code handling

Reimplementation of ftp_status function.
New version requires explicit list of expected codes.
It flush data connection input before sending a command
and blocks until expected result appears.
ftp: move common commands code to function

Each send command routine requires the same steps.
This commit moves repeated code into one function.
ftp: reconnect on seek

ABOR command usually takes long (FTP server implementation dependent).
It also produces different response codes from different servers.

It is save for ffmpeg to reconnect both connection during seek for two reasons:
1. Alreay mentioned heavy manner of ABOR command.
2. Server may disconnected due to no transfer (seek after a long pause in ffmpeg client)
ftp: enhanced error handling

Add error codes to expected codes to make responses faster.
Success of a command is validated by comparing code to a success code.