WL#3952: Add @@optimizer_switch variable

Affects: Server-6.0   —   Status: Complete   —   Priority: Medium

Add @@optimizer_switch variable that will allow to turn off individual
optimizations.
1. Rationale
============
We need the ability to turn off individual optimizations. This is necessary
for easier testing and meaningful comparative benchmarks.


2. Solution description
=======================
We'll introduce a new session/global variable, named

  @@optimizer_switch

The value of the variable is a comma-separated list of optimizations that
are turned off. The underlying structure is a set (bitmap). Elements of the
list will be named after this pattern:

  no_{optimization-name}

In scope of this WL entry we will implement switch-off functionality for two
optimizations: semi-join (WL#2980) and materialization (WL#1110).


3. System variable checklist answers
====================================

- Purpose 
  A set of disabled optimizations.

- Name
  - System variable name:  @@optimizer_switch
  - Name for the script "configure": none (not settable)
  - Name for the configuration file: none (not settable)
  - Name for the command-line option: none (not settable)

- Allowed values
  - Type: Comma-separated list of mnemonic names.
          Currently only two names are possible: 
          "no_materialization"
          "no_semijoin"
  - Range of proper values: {not a range}
  - Default value: {empty string}

- Scope: both session and global
- Read-only or dynamic in each scope: Dynamic 
- Dependencies: none
- Relation to stored programs: it is a "dynamic variable"
- Relation to replication: No auto-replication.



Follow the approach used in @@sql_mode.