CHERRY-PICK: Add signal handler in camera test fixture

The current autotest framework doesn't register signal handler by
default.  So it doesn't release python-level resources once a test is
killed with SIGTERM (for example, OpenCV doesn't release camera device
correctly with SIGTERM).

BUG=chrome-os-partner:19583
TEST=Manually
1. Run the test
2. Stop the test on the left pane when camera is capturing images.
3. On some platform, camera may stop working if it was not closed properly.

Change-Id: I40863e69a8541338e0aad0ec0c45273fdd5518fc
(cherry picked from commit 6eb701c09dbec9a4b330824ec1523d3a5c52bd4d)
Reviewed-on: https://gerrit.chromium.org/gerrit/56019
Commit-Queue: Justin Chuang <jchuang@chromium.org>
Reviewed-by: Justin Chuang <jchuang@chromium.org>
Tested-by: Justin Chuang <jchuang@chromium.org>
1 file changed