Overhaul SQL generating logic in WP_Meta_Query to avoid unnecessary table joins.

The logic used to generate clause SQL in `WP_Meta_Query` is somewhat arcane,
stemming mostly from an ongoing effort to eliminate costly table joins when
they are not necessary. By systematizing the process of looking for shareable
joins - as was done in `WP_Tax_Query` [29902] - it becomes possible to simplify
the construction of SQL queries in `get_sql_for_clause()`. Moreover, the
simplified logic is actually considerably better at identifying shareable
joins, such that certain uses of `WP_Meta_Query` will see joins reduced by 50%
or more.

Includes integration tests for a representative cross-section of the query
clause combinations that result in shared table aliases.

Props boonebgorges, sc0ttkclark.
See #24093.
Built from https://develop.svn.wordpress.org/trunk@29940


git-svn-id: http://core.svn.wordpress.org/trunk@29691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Bail from cleaning meta query clause when it's not an array.

Later isset() checks on string values were causing notices on PHP < 5.4.

Props jorbin.
See #29642.
Built from https://develop.svn.wordpress.org/trunk@29941


git-svn-id: http://core.svn.wordpress.org/trunk@29692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: Fix hover and focus style for links in content with custom color schemes.

Props iamtakashi, fixes #29978.

Built from https://develop.svn.wordpress.org/trunk@29942


git-svn-id: http://core.svn.wordpress.org/trunk@29693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Twenty Fifteen: Removing unused custom color controls.

Props cainm, fixes #29982 and #29959.


Built from https://develop.svn.wordpress.org/trunk@29944


git-svn-id: http://core.svn.wordpress.org/trunk@29694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Invalidate cache for child terms when parent term is deleted.

Props socki03.
Fixes #29911.
Built from https://develop.svn.wordpress.org/trunk@29945


git-svn-id: http://core.svn.wordpress.org/trunk@29695 1a063a9b-81f0-0310-95a4-ce76da25c4cd