extract Scan Preview code into a preview widget

instead of scribbling over the parent dialog directly. Doing is this way allows
the .ui-ification to work right.

Change-Id: Ia0c33eae4cd5a4c94896436fe5a5afad8d60a577