WIP: Add video_transformation_pipeline

Turns out that we need more control over the pipeline than we thought.
Add stbt camera calibrate
WIP: Smart TV Support: Perform geometric correction to reconstruct TV image

Like set-top boxes, Smart TVs run complex software, including software
not provided by the manufacturer (e.g. apps).  Unlike set-top boxes they
provide no digital video output - the only video output they provide is
to screen.  So to support testing software running on TVs we need to
capture the contents of the TV screen.

We plan to do this with a webcam and some image processing to get the
contents of the screen such that we can feed that into GStreamer.  The
image processing will correct for problems with the positioning of the
camera and issues with the lens (which we will call "flattening") as well
as problems with the colours and brighness of the pixels.

This commit adds a GStreamer element `stbtwatchplane` which flattens the
image by first undoing distortions due to the camera lens and then
extracting the region in the undistorted image that corresponds to the
TV (homography) like:

                  |----------------------------|
    1080p         |       stbtwatchplane       |        720p
  Image from  --> |                            | --> Contents of
    Camera        | Undistort  --> Perspective |         TV
                  |----------------------------|

Undistort is parameterised by the properties:

* `camera-matrix` - A 3x3 matrix of the form:

        f_x   0   c_x
         0   f_y  c_y
         0    0    1

* `distortion-coefficients` - 5 values of the form:

        k_1, k_2, p_1, p_2, k_3

The perspective transformation is parameterised by the property:

* `homography-matrix` - A 3x3 matrix.

See the OpenCV documentation for more information[1].

The combined undistort/perspective transformation is actually done in one
operation.  We create a 1280x720 matrix where each "pixel" contains (x, y)
coordinates of where the real pixel value should be taken from in the
source 1080p image.  The OpenCV function `cvRemap` then justs looks
through this matrix to produce a 720p image from the 1080p input.

We generate this remapping matrix by tracing pixel locations from the 720p
image back through to the location on the 1080p image.  This means doing
the reverse perspective transformation on the coordinates and then
distorting the coordinates.

`stbt camera calibrate` is enhanced to generate the parameters described
above by displaying an image of a chessboard on the TV and then comparing
the measured values to the expected ones.

In test with real life TVs this calibration/correction achieves pixel
perfect positioning according to `stbt camera validate`.

This commit adds an optional build-time/test-time dependency on a C
compiler, OpenCV development headers and GStreamer development headers.
If they are not installed the GStreamer element will not be built.

[1]: http://docs.opencv.org/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html

TODO:
* Rename stbtwatchplane to stbtgeometriccorrection
* Add tests for calibration
WIP: Smart TV Support: Add stbtvignettecorrect element

Does location dependent contrast stretching

TODO:
* Add documetation
* Rename stbtcontraststretch or stbtilluminationcorrect
WIP: Add interactive colour adjustment

TODO:
Show graphs
REMOVEME: Disable manual driver integration test
REMOVEME: Investigating Travis failures
Fixup add GStreamer shared library
is_screen_black: Save debugging images on failure

This is useful when debugging issues when the screen seems black but
`is_screen_black` reports otherwise.
Misc: Fix typo in error message

Instead of "usedwith" it says "used with".
WIP: Fix is_screen_black test
WIP: Fix test runs on Travis