Optimize row_number window function 

Identify the query shape with a filter on the row_number() and rewrite it for optimal execution.
Examples of query shapes affected by this: 
https://gist.github.com/nileema/71d0099d804a10cb172b

Note: Optimization applies only if the all the following criteria are met: 
1. There is a single row number function in the query 
2. The filter is a simple comparison with a literal (compound expressions are not supported in this revision) 
3. The filter operation is directly above the window  function
Instead of planning this as a partial limit followed by a merge, we should plan this as a hash partition on the partition keys, followed by the top n row number limit. That way it doesn't have to be collapsed to a single node plan