Progress thread: less aggressive redraw

In commit I643e30505f962ebbf67aae57baa06a296006e542 , 'enhance the
progress thread update', I incorrectly amended philz-cwm6's commit to
work around a theoretical issue of keeping the installer's spinning
cube rotating when no progress bar is shown. While my amendment works,
it keeps the progress_thread updating text and overlays even when
sitting at the menu. This is overly aggressive. Change the update
mechanism to only apply when the background installer image is visible.

Also, make ui_increment_frame() static since is is local-only now.

Change-Id: I2fa2f8a0704f562fb027ba4bee9b1b7d278da404
stop showing the background icon progress outside it's scope

Also, extend print_and_error() to act as a pass-through, returning the
original error code.

Conflicts:
	extendedcommands.c
	nandroid.c
	nandroid.h

Change-Id: I3d7ee71f627f871f64defe7902b91b762ca97d59
Merge pull request #10 from CyanogenMod/cm-11.0

Sync with cyanogenmod