proxydll: try to listen on different ports if the first one fails; rewrite of the server code

Ports 19990 - 19999 are used in a loop, until one works. When the connection goes down, the server listens again!