Fix https://github.com/julianhyde/optiq/issues/284, "Window functions Range defaults to CURRENT ROW" and https://github.com/julianhyde/optiq/issues/285, "Window functions throw exception without ORDER BY".