snapuserd: Refactor buffer allocation code

Since there is no change in the buffer allocation
code with respect to snapshots in user-space, refactor
it so that we have a common code base.

Bug: 193863397
Test: Build
Signed-off-by: Akilesh Kailash <akailash@google.com>
Change-Id: I3a7b3d319f6d1532b1bb63af9884b64e1346bb50
8 files changed