Fixed following

TEIID-2983: disallowed multiple count aggregates in single select statement by throwing an exception
TEIID-2990: If no columns are projected the query will end up in exception; also if literal is being selected then added support for  from MongoDb 2.6
TEIID-2988: Added third paramters to  function to indicate the length of the string if only two parameters are supplied substring function
TEIID-2987: correctly projected when functions, aggregatefunctions are used in criteria of the sql statement, previously only column refereces were being projected