Move variable init out of try so can use in final
implement daemon restart workaround

The daemon is flakey if you call the camera too often without restarting it.
It is also flakey if you restart it every time you call the camera.

So we'll restart it after every X camera calls.
move mut exclusive binning/subsampling check

Can't check themm if there isn't a format dictionary, so put it in the block
that has been checked for dict existence.