Update QueryBuilder.php

Change using of <code>implode</code> to convert array of queries to union to <code>array_reduce</code>. Result of this changing is that code feel difference between two selects that connects with <code>UNION</code> and two selects that connects with <code>UNION ALL</code>.

This PR must be connected with this : https://github.com/yiisoft/yii2/pull/2123