Fix SQL generation when `meta_query` has an `'relation' => 'OR'` for its queries and wants to `'orderby' => 'meta_value'`.

Adds unit test.

Props jackreichert.
Fixes #25538.


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


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