First generator stub.
Minor fixes.
Fix a bug with waitKey.

Among the other awful interface choices of OpenCV, there appears to be
an undocumented "feature" of waitKey that makes it sometimes return
numbers with additional bits set.

See also http://stackoverflow.com/q/9172170/807307.
Move FrameReader body in a dedicate file.
Add another test program.