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
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.
MDEV-406: ANALYZE $stmt: Make multi-table UPDATE/DELETE work, code cleanup.
Code cleanup