pvcam: detect and handle when the camera is turned off/on

also fix the readout rate and gain settings
pvcam: force close/open of the camera after each acquisition to avoid lock

seems like a bug in the libpvcam: if the exposure time is small (<0.75s), a series of
sub/unsub will block the camera. close/open() of the camera seems to avoid this bug.