Implement and test GenerateMinidump.

BUG=
R=chrisha@chromium.org

Review URL: https://codereview.appspot.com/171250043