bugfix for AQL query optimiser

the following type of query was too eagerly optimised, leading to errors in code-generation:

   LET a = (FOR i IN [] RETURN i) LET b = (FOR i IN [] RETURN i) RETURN 1

the problem occurred when both lists in the subqueries were empty. In this case invalid code
was generated and the query couldn't be executed.
updated CHANGELOG
typecast