libxrdp: make sure jpeg quality is valid