MDEV-4836: Wrong result on <not null date column> IS NULL (old documented hack stopped working)
- When applying optimization introduced by MDEV-4817, ignore the conditions that have form
  "datetime_not_null_col IS NULL".
Fix for MDEV-4836: Merge with current 5.5
Fix for MDEV-4836 fix: take into account situation where "notnull_col IS NULL" is not 
a direct child of the WHERE clause item, but rather is embedded inside Item_cond_and or 
Item_cond_or.
Automatic merge of MDEV-4836 fix into 5.5
mdev-4942: Add another testcase after merging with other fixes.
Fixed bug mdev-4971.
The function propagate_new_equalities() did not updated properly
the references to inherited multiple equalities.
Merge 5.3->5.5
Merge
MDEV-4836: Merge into 5.5-main
MDEV-4926: Remove division-using-subtraction implementation from semi-sync plugin

If rpl_semi_sync_master_timeout is large, calculation of absolute waiting time in semi-sync plugin is inefficient. This error is specific to systems with 64 bit long values (all 64 bit Unixes)
In  rpl_semi_sync_master_timeout has maximal value (= MAX_ULONGLONG), calculating abstime may require  ~ 18 billion subtract operations.

The fix is to use division instead of subtraction-in-a-loop. Also fixed an integer overflow bug.