MDEV-4088 Replication 10.0 -> 5.5 fails

update 5.1 to replicate from 10.0 and
to show the server version (as of 10.0) correctly
MDEV-4244 [PATCH] Buffer overruns and use-after-free errors

fixes for gcc 4.8 - compilation warnings and -fsanitize=address
MDEV-4326 fix.

Removed "optimization" which caused preoblems on second execution of PS with string parameter in LIMIT clause.

Fixed test_bug43560 to be able to skipp it if connection is UNIX socket.
MDEV-4280: Assertion `empty_size == empty_size_on_page' failure in ma_blockrec.c or ER_NOT_KEYFILE on query with DISTINCT and GROUP BY
This could happen when using Aria for internal temporary files (default case) and using DISTINCT.
_ma_scan_restore_block_record() didn't work correctly if there was rows inserted, updated or deleted on the handler
between calls to _ma_scan_remember_block_record() and _ma_scan_restore_block_record().
The effect was that some DISTINCT queries that used remove_dup_with_compare() could fail.
Fixed compiler warning
Fixed compiler failure on solaris
MDEV-4575 MySQL client doesn't strip off 5.5.5- prefix while connecting to 10.x server

extend 5.1 client library to read 4 byte capabilities from the first handshake packet.
two higher bytes are always zeros for 5.1 servers.