Encapsulate access to window partition values

This introduces a new abstraction, WindowIndex, that is similar to
PagesIndex, but is read-only, and only has access to the rows within
the window partition (and thus hides the partition offset).
Extract method for analyzing expressions
Move window function tests together
Add basic validation of window frames
Add support for window frames