Add --window and --duration options

The --window option allows running in an X environment that is already running,
by creating a window to draw on instead of drawing on the root window.

The --duration option sets the duration of each subtest in seconds. The default
is 5 seconds.