Fixed hashToWhereConditions and arrayValue in QueryGenerator to correctly handle in: and not: in where: conditions (fixes #1079)

Note this fixes #1079  in 2.0.0-beta.1. In 2.0.0-beta.2, the query is generated correctly (when calling QueryGenerator.selectQuery directly), but the query doesn't execute (#1214)