DO NOT MERGE: Backport N backup/restore stability work to M

This is a squashed rollup of backup/restore infrastructural work in
the N release.  It intentionally omits semantic/API changes such
as the introduction of the onQuotaExceeded() callback.

This patchset should not be merged beyond M maintenance releases.

Bug 29617908
Bug 29848715

Change-Id: I1eb25ad07f3bbf1132198d8a233722c41f1ac4cc
3 files changed