Add a device-side unittest target

This change also adds two static libs, libbspatch and libbsdiff,
which encapsulate the dependencies of both the binaries and the
unit tests.

TEST=`mma external/bsdiff` and ran unittests on host and bullhead:NRC47C

Bug: 26971929
Change-Id: Ica0b17fa60f3ddf86d03ae12e6c099efbdd1296b
4 files changed