Add RFB protocol version negotiation

Before, always RFB protocol version 3.3 was used. If the client
did not support the by the server advertised version, the program
would hang. The correct behavior is, to select the next lower
supported version.