Add sync reason to dumpsys

Also:
 * add a second history section that logs
 * log mesg as text instead of number
 * dump Sync Status as a table

 Sample log:
Recent Sync History
  #1  : 2012-10-11 15:06:11     USER    0.4s            aagmtest1@gmail.com/com.google u0  com.android.calendar                                  com.google.android.calendar
  #2  : 2012-10-11 15:06:11     USER    0.1s            aagmtest1@gmail.com/com.google u0  subscribedfeeds                                       android.uid.system:1000
    mesg=parse-error
  #3  : 2012-10-11 15:06:11     USER    0.0s            aagmtest1@gmail.com/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider android.uid.system:1000
  #4  : 2012-10-11 15:06:10     USER    0.1s            aagmtest1@gmail.com/com.google u0  com.google.android.gms.plus.action                    android.uid.system:1000

Recent Sync History Extras
  #1  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  com.android.calendar                                  Bundle[{feed=aagmtest1@gmail.com, force=true, ignore_settings=true, ignore_backoff=true}]
  #2  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  subscribedfeeds                                       Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #3  : 2012-10-11 15:06:11     USER   aagmtest1@gmail.com/com.google u0  com.google.android.apps.uploader.PicasaUploadProvider Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]
  #4  : 2012-10-11 15:06:10     USER   aagmtest1@gmail.com/com.google u0  com.google.android.gms.plus.action                    Bundle[{ignore_backoff=true, force=true, ignore_settings=true}]

Sync Status
Account aagmtest1@gmail.com u0 com.google
=======================================================================
Authority                                           Syncable  Enabled  Delay  Loc  Poll  Per  Serv  User  Tot  Time  Last Sync            Periodic
-------------------------------------------------------------------------------------------------------------------------------------------------------------
com.google.android.apps.currents                    1         true            0    2     1    2     1     6    0:35  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:40  2012-10-13 14:58:13
com.google.android.music.MusicContent               1         true            0    0     1    2     1     4    0:09  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:18  2012-10-13 14:58:13
com.google.android.gms.plus.action                  1         true            0    0     1    1     1     3    0:00  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:15  2012-10-13 14:58:13
com.google.android.apps.magazines                   1         true            0    1     1    2     1     5    0:14  PERIODIC SUCCESS     86400
                                                                                                                     2012-10-12 14:59:00  2012-10-13 14:58:13

Change-Id: Iffeb825e4b4f6217940a39b0dd71e06856f08f3f
8 files changed