Split out building a debian version from an upstream commit

based on a patch by Daniel Dehennin

Needed for #672954, #646684, #669171
Fix docstring
tests.test_GitRepository: import and setup gbp.log

In order to initialize gbp logging properly. Fixes false positives when
the GitRepository tests are run alone.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Include the name of the package being built in the debian tag message

Currently, the message in the debian tag is just:

  "Debian release %s" % cp.version

This is a bad idea, because it means that the signed message itself
contains no mention of the project that is being worked on.

Since all git repositories are conceptually the same git repository
(some just have commits that others don't have), a malicious attacker
could inject tags from project A into the repository for project B and
the original developer's signature on those tags would be intact.

This is potentially a security problem.  For example: if there are
automated build systems that pull from a repo and verify signed tags
made by a known developer (and that developer contributes to multiple
projects), this conflation could be used to make those systems build
packages from an entirely other project.

The attached patch enforces the inclusion of the name of the package
into the tag's message.

Closes: #704018
Document changes and release 0.6.0~git20130329
Move debian/changelog manipulation to gbp.deb.changelog.ChangeLog.

spawn_dch switch gbp.command.wrappers.Command.

* gbp/deb/changelog.py (ChangeLog.spawn_dch): static method adapted from
  gbp.scripts.dch and converted to gbp.command_wrappers.Command.
  (add_entry): New method adapted from
  gbp.scripts.dch.add_changelog_entry.
  (add_section): New method adapted from
  gbp.scripts.dch.add_changelog_entry. Remove DebianGitRepository and
  options, this has nothing to do with changelog management.

* tests/test_Changelog.py: Test new methods.

* gbp/scripts/dch.py: Remove useless functions: system(), spawn_dch(),
  add_changelog_section() and add_changelog_entry().
  Update calls accordingly.
  (fixup_trailer): Use spawn_dch() method of ChangeLog class.
  (process_options): dch_options became a list.
  (main): Use add_section() and add_entry() methods of ChangeLog object.
  Take care of upstream version since ChangeLog.add_section() does not
  manage it anymore.
  Update exception handling, ChangeLog.spawn_dch() can raise
  "CommandExecFailed" exception.

Closes: #672954
Move DebianPkgPolicy to separate module
Move DscFile to separate module