Tear down agents properly at EOD in full restore

The restore engine wasn't tearing down the bound agent after reaching
the end of data for the app, and furthermore was allowing the restore
operation to resume running the queue before all data had been delivered
to the current target.

Also make LocalTransport deliver data in 2K chunks rather than 32K,
as a first step towards making its timing characteristics more like
we'll see in networked situations.

Finally, added a bunch of MORE_DEBUG output for finding odd bugs
like this.

Change-Id: Icdbe6a070af6cc7c708a938ad044108d40ebce9a
diff --git a/core/java/com/android/internal/backup/LocalTransport.java b/core/java/com/android/internal/backup/LocalTransport.java
index 7e58351..50e7bcf 100644
--- a/core/java/com/android/internal/backup/LocalTransport.java
+++ b/core/java/com/android/internal/backup/LocalTransport.java
@@ -271,6 +271,9 @@
                 mFullTargetPackage = null;
                 mSocket.close();
             } catch (IOException e) {
+                if (DEBUG) {
+                    Log.w(TAG, "Exception caught in finishBackup()", e);
+                }
                 return TRANSPORT_ERROR;
             } finally {
                 mSocket = null;
@@ -576,7 +579,7 @@
                 return TRANSPORT_PACKAGE_REJECTED;
             }
             mFullRestoreSocketStream = new FileOutputStream(socket.getFileDescriptor());
-            mFullRestoreBuffer = new byte[32*1024];
+            mFullRestoreBuffer = new byte[2*1024];
         }
 
         int nRead;