WL#4797: Extending protocol's OK packet

Affects: Server-5.7   —   Status: In-Documentation

For several commands (e.g. SET NAMES, SET character_set, USE database, SET
SQL_MODE) the client receives an ok packet only without information about server
status changes: e.g. after SET NAMES big5 the server assumes that the client
will send big5 encoded data, while the client character set is still latin1.

Proposal: extend the OK packet to allow server to send more information.

List of server changes we need to transmit:
- Session system variables
- current database (schema)
- info is sent as a lenenc string when CLIENT_SERVER_STATE_CHANGE
  is supported. Else the previous format is followed.