Launchpad ingestion to archive endpoint

Wire up launchpad ingestion to charmstore filling out new api/models.
You should close resp.Body.

Perhaps create a separate function to do a charm store request.
Something like this, perhaps?

    func CharmStoreDo(req *http.Request, result interface{}) error {
        resp, err := http.DefaultClient.Do(req)
        if err != nil {
              return errgo.Mask(err)
        }
        defer resp.Body.Close()
        dec := json.NewDecoder(resp.Body)
        if resp.StatusCode != http.StatusOk {
             var perr params.Error
             if err := dec.Decode(&perr); err != nil {
                  return errgo.Notef(err, "cannot unmarshal error response")
             }
             if err.Message == "" {
                   return errgo.New("error response with empty message")
             }
             return &perr
        }
        if err := dec.Decode(result); err != nil {
             return errgo.Notef(err, "cannot unmarshal response")
        }
        return nil
    }

Then you can do:

      var resp params.ArchivePostResponse
      if err := CharmStoreDo(req, &resp); err != nil {
           logger.Errorf("error uploading %s: %v", id, err)
      } else {
           logger.Debugf("uploaded %s", resp.Id)
      }