cgpt: enable calling CgptEdit

This change allows CgptEdit to be called via the API. Prior to this
change link fails in an app that uses CgptEdit due to undefined
reference.  The underlying implementation wasn't checking set_unique so
I've fixed that as well.

BRANCH=none
BUG=None
TEST=Added CgptEdit(0) call to extern.c and verified that build failed.
Added cgpt_edit.c to Makefile and confirmed that build is now
successful.  Successfully ran unit tests on both vboot_reference and the
app I'm working on that calls CgptEdit (which also has a unit test for
setting the drive ID).

Change-Id: Ie0a46ff96406eb83d0564d3f1eac978e0565ed76
Signed-off-by: Matt Delco <delco@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1361948
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
3 files changed