Fix Tab switching when starting a Download

When a Download URL opens in a new Tab,
the browser attempts to start the Download
and close the Tab. The methods used to do this
were buggy, leaving the visible tab in a broken
state.

Change-Id: I3eb0e9ca0992bfec48de2f58f5aa2895018cdd88
diff --git a/src/com/android/browser/Controller.java b/src/com/android/browser/Controller.java
index 946e456..e71bc27 100644
--- a/src/com/android/browser/Controller.java
+++ b/src/com/android/browser/Controller.java
@@ -2986,6 +2986,7 @@
         }
 
         if (change_tabs) {
+            setActiveTab(tab);
             synchronized (mThumbnailCbList) {
                 startCaptureTimer();
                 mLatestCreatedTab = tab;
@@ -2994,7 +2995,6 @@
                     public void onReceiveValue(Bitmap bitmap) {
                         synchronized (mThumbnailCbList) {
                             if (mLatestCreatedTab != null) {
-                                setActiveTab(mLatestCreatedTab);
                                 mLatestCreatedTab = null;
                             }
                             stopCaptureTimer();