Re-commit in git:
MDEV-406: ANALYZE $stmt
- Ported the old patch to new explain code
- New SQL syntax (ANALYZE $stmt)
- ANALYZE UPDATE/DELETE is now supported (because EXPLAIN UPDATE/DELETE is supported)
- Basic counters are calculated for basic kinds of queries
  (still need to see what happens with join buffer, ORDER BY...LIMIT queries, etc)
MDEV-406: ANALYZE $stmt
-Add analyze_stmt.test/result
MDEV-406: ANALYZE $stmt
- Support tracking for UNIONs, temporary-table based ORDER BYs,
  and both.
MDEV-406: ANALYZE $stmt
- Testcase for ANALYZE UNION
- Provide r_rows for union result.
Update analyze_stmt.result after the last commit
cmake GUI cleanup

mark path-related variables (AIO_LIBRARY, ODBC_LIBRARY, ODBC_INCLUDE_DIR,
Thrift_LIBS, Thrift_INCLUDE_DIRS, CRYPTO_LIBRARY, OPENSSL_LIBRARIES,
OPENSSL_ROOT_DIR, OPENSSL_INCLUDE_DIR) as advanced - paths are
automatically discovered by cmake.

mark few choice variables (ENABLED_LOCAL_INFILE, WITHOUT_SERVER,
DISABLE_SHARED) as not advanced - they are user choices, not automatically
configured values.

remove unused BACKUP_TEST variable.
MDEV-6248 GUI-friendly cmake options to enable/disable plugins

* Introduce a set of PLUGIN_xxx cmake options with values
  NO, STATIC, DYNAMIC, AUTO, YES (abort if plugin is not compiled)
* Deprecate redundant and ambiguous WITH_xxx, WITH_PLUGIN_xxx,
  WITH_xxx_STORAGE_ENGINE, WITHOUT_xxx, WITHOUT_PLUGIN_xxx,
  WITHOUT_xxx_STORAGE_ENGINE
* Actually check whether a plugin is disabled (DISABLED keyword was
  always present, but it was ignored until now).
* Support conditionally disabled plugins - keyword ONLY_IF
* Use ONLY_IF for conditionally skipping plugins, instead of
  doing MYSQL_ADD_PLUGIN conditionally as before. Because if
  MYSQL_ADD_PLUGIN isn't done at all, PLUGIN_xxx=YES cannot work.
MDEV-406: ANALYZE $stmt: get ANALYZE work for subqueries

- "ANALYZE $stmt" should discard select's output, but it should still
  evaluate the output columns (otherwise, subqueries in select list
  are not executed)
- SHOW EXPLAIN's code practice of calling JOIN::save_explain_data()
  after JOIN::exec() is disastrous for ANALYZE, because it resets
  all counters after the first execution. It is stopped
  = "Late" test_if_skip_sort_order() calls explicitly update their part
    of the query plan.
  = Also, I had to rewrite I_S optimization to actually have optimization
    and execution stages.
MDEV-406: ANALYZE $stmt: fix order_by.test

In JOIN_TAB::update_explain_data(), take into account that
- the table that may have pre-sorted is the first non-const table
- Tables that are eliminated by table elimination are marked
  as const tables, but are not present in the Explain data structures
Fix compile on Windows: use rint() instead of round().
MDEV-406: ANALYZE $stmt: Scans that never executed will have r_rows=NULL
MDEV-6361: innodb_compression_algorithm configuration variable can
be set to unsupported value.

MDEV-6350: Excessive unnecessary memory allocation at InnoDB/XtraDB
startup if LZO is installed.
MDEV-406: ANALYZE $stmt: add support for BNL join buffering
MDEV-406: ANALYZE $stmt: add some tests for joins
Merge bb-10.1-explain-analyze into 10.1
MDEV-406: ANALYZE $stmt: more testcases, fix memory leak
Fix test failure when trying to set compression algorithm to 3
MDEV-406: ANALYZE $stmt: fix "explain UPDATE view problem".
Merge branch '10.1' of github.com:MariaDB/server into 10.1

Conflicts:
	storage/xtradb/handler/ha_innodb.cc
MDEV-12 OpenGIS: create required tables: GeometryColumns, related views.
        Scripts added that create OpenGIS-required views and tables they're based upon.