WL#6355: Semisync: externalize transactions only after ACK received

Affects: Server-5.7   —   Status: Complete

This worklog will implement an option which provides lossless failover than the
original implementation.

PROBLEM
=======
Before the worklog, the master waits for ACK from slave after it has committed 
to the storage engine. This ensures the slave cannot lag arbitrarily, but it can
still lag by a bounded amount:
- If there are N clients on the master, then the master may have committed N 
  transactions that are not on the slave.
- Moreover, even if the committing client on the master has not received the 
  ACK, concurrent clients on the master can see the change.

SOLUTION
========
In this worklog, an option is implemented to make the master wait for ACK after 
preparing the storage engine and writing to the binary log, but before 
committing to the storage engine.

This allows for true lossless failover: if the master crashes, the slave is for 
sure up to date. 


DOCUMENTATION NOTES
===================

User documentation:
http://dev.mysql.com/doc/refman/5.7/en/server-system-
variables.html#sysvar_rpl_semi_sync_master_wait_point
http://dev.mysql.com/doc/refman/5.7/en/replication-semisync.html
http://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-2.html