Add tests for vboot_firmware.c

Yaay, LoadFirmware() finally has unit tests!

Fix minor memory leak in LoadFirmware().

BUG=chromium-os:17564
TEST=make && make runtests

Change-Id: I7eabc14484271f488b77f286e846781ccc22b8f2
(cherry picked from commit 2b7c5635d7069c55a1d96d11b99d02291b7e308b)
Reviewed-on: http://gerrit.chromium.org/gerrit/7052
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
diff --git a/tests/test_common.h b/tests/test_common.h
index 7a64ed3..6f594f9 100644
--- a/tests/test_common.h
+++ b/tests/test_common.h
@@ -11,28 +11,28 @@
 
 /* Return 1 if result is equal to expected_result, else return 0.
  * Also update the global gTestSuccess flag if test fails. */
-int TEST_EQ(int result, int expected_result, char* testname);
+int TEST_EQ(int result, int expected_result, const char* testname);
 
 /* Return 0 if result is equal to not_expected_result, else return 1.
  * Also update the global gTestSuccess flag if test fails. */
-int TEST_NEQ(int result, int not_expected_result, char* testname);
+int TEST_NEQ(int result, int not_expected_result, const char* testname);
 
 /* Return 1 if result pointer is equal to expected_result pointer,
  * else return 0.  Does not check pointer contents, only the pointer
  * itself.  Also update the global gTestSuccess flag if test fails. */
 int TEST_PTR_EQ(const void* result, const void* expected_result,
-                char* testname);
+                const char* testname);
 
 /* Return 1 if result pointer is not equal to expected_result pointer,
  * else return 0.  Does not check pointer contents, only the pointer
  * itself.  Also update the global gTestSuccess flag if test fails. */
 int TEST_PTR_NEQ(const void* result, const void* expected_result,
-                char* testname);
+                 const char* testname);
 
 /* Return 1 if result string is equal to expected_result string,
  * else return 0.  Also update the global gTestSuccess flag if test fails. */
 int TEST_STR_EQ(const char* result, const char* expected_result,
-                char* testname);
+                const char* testname);
 
 /* ANSI Color coding sequences.
  *