Dock: improved preview loading mechanism, added preview for folders and state files.

Change-Id: I83a54570f8fdaf83e681e6c7c3b5c8be9494978e