Fix a few bugs found in testing

Couple of bloopers found during testing: integer properties not getting
converted correctly by getters, and some redundant method defs
First stab at tests

Initial attempt at automated testing with py.test. Just iterating over
possible values while running previews and not has already turned up a
few bugs which are now squashed
Merge branch 'master' of github.com:waveform80/picamera