AU: Sign delta payloads

- Change .proto to have explicit offset/length of signature. I was
  hoping the length could be kept out of the proto, but it needs to go
  in. The way we cheat and keep the signature in the file is to have a
  dummer install operation at the end that will cause old clients to
  write the signature data to nowhere.

- Change delta generator to take an optional private key, which if
  present will cause the payload to be signed

- Cleanup Omaha hash calculator, which should be renamed to SHA1 hash
  calculator, and allow export of the non-base64 encoded SHA1 result.

- Note: signatures are not yet checked. That will come in a future CL.

BUG=5662
TEST=unittests

Review URL: http://codereview.chromium.org/3132033
diff --git a/update_metadata.proto b/update_metadata.proto
index 20c5d9f..213e740 100644
--- a/update_metadata.proto
+++ b/update_metadata.proto
@@ -120,9 +120,10 @@
   optional uint32 block_size = 3 [default = 4096];
 
   // If signatures are present, the offset into the blobs, generally
-  // tacked onto the end of the file. We use an offset rather than
-  // a bool to allow for more flexibility in future file formats.
-  // If this is absent, it means signatures aren't supported in this
+  // tacked onto the end of the file, and the length. We use an offset
+  // rather than a bool to allow for more flexibility in future file formats.
+  // If either is absent, it means signatures aren't supported in this
   // file.
   optional uint64 signatures_offset = 4;
+  optional uint64 signatures_size = 5;
 }