winsane: Provide Device IsOpen function to check device state
winsane: Allow options to be retrieved while device is closed
wiasane: Handle device state using reference counted uses

Another step to handle connection interruption. Next step will be
to completely decouple the local WIA interface from the network
interface and handling most of the WIA commands locally.
wiasane: Decouple setting scan mode from session and device state
wiasane: Remove obsolete entry conditions
wiasane: Set resolution only once using X resolution

Abort if Y resolution does not equal to X resolution.
wiasane: Fixed OpenScannerDevice if session was previously closed
wiasane: Decouple pixel window from session and device state