When `meta_type` is passed with `orderby => meta_value`, `orderby` must also use `CAST()` to avoid scenarios like: `SELECT`ing by `UNSIGNED` and then ordering by `CHAR`. Adds unit test.

Fixes #21621.

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


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