WL#8206: Introduce separate error code range for 5.7

Affects: Server-5.7   —   Status: Complete

All error messages sent from the server to the client have separate error codes.
The error code is available as the MYSQL_ERRNO item in the Condition Area. See:
  - http://dev.mysql.com/doc/refman/5.7/en/error-messages-server.html
  - http://dev.mysql.com/doc/refman/5.7/en/diagnostics-area.html 

These codes are currently numbered consecutively, starting at 1000.
We also have a second range of error codes used by the client, starting at 2000.
The problem is that the first range of codes is currently up to 1974 which
means that these two ranges will soon overlap. Which will make it hard to
differentiate between server and client errors.

This worklog is about implementing a separate range of numbers for new server
error messages introduced in 5.7. The range will start at 3000. This avoids
the problem of overlapping server and client error codes.

Further, by introducing a separate range for 5.7, it will be possible to
introduce new error codes in 5.6 even after 5.7 is GA as this can be done
without interfering with codes already in use by 5.7. (We guarantee that
a given error messages never changes its code).  We should therefore also
use separate ranges for each new GA version.

Finally, it will make it possible to e.g. reserve code ranges for forks so
that they can use codes without interfering with codes used by MySQL.

User Documentation
==================

http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-6.html