1. Added is_correlated flag to item_subselect for IDB to use.
2. Fixed around prepare statement. More fixes are still needed.
3. Fixed parser for COUNT DISTINCT on window functions.