Switch OmahaEvent's error_code to ActionExitCode.

Also, emit the errorcode attribute only for non-success events.
Added explicit unit tests for OmahaEvent.

BUG=560
TEST=unit tests, gmerged on device, forced update, looked at logs.

Review URL: http://codereview.chromium.org/3035007
diff --git a/omaha_request_action.h b/omaha_request_action.h
index 5564e73..b487a3b 100644
--- a/omaha_request_action.h
+++ b/omaha_request_action.h
@@ -67,15 +67,19 @@
   OmahaEvent()
       : type(kTypeUnknown),
         result(kResultError),
-        error_code(0) {}
-  OmahaEvent(Type in_type, Result in_result, int in_error_code)
+        error_code(kActionCodeError) {}
+  explicit OmahaEvent(Type in_type)
+      : type(in_type),
+        result(kResultSuccess),
+        error_code(kActionCodeSuccess) {}
+  OmahaEvent(Type in_type, Result in_result, ActionExitCode in_error_code)
       : type(in_type),
         result(in_result),
         error_code(in_error_code) {}
 
   Type type;
   Result result;
-  int error_code;
+  ActionExitCode error_code;
 };
 
 class NoneType;