Update QueryBuilder.php

Change using of implode to convert array of queries to union to array_reduce. Result of this changing is that code feel difference between two selects that connects with UNION and two selects that connects with UNION ALL.