Factorize get_image into open_input and get_frame.

Allows for finer control of input, including ability
to fetch multiple frames from a video.
Add example of fetching and displaying a video.

Steps through frames with a keypress.
Add optional scaler for decoded frames.
Use a custom dim type for swscale.

Also provide accessor to fetch dimensionality of the
first stream in the video.