replace signal numbers in trap with their according signal names

Get rid of:

| possible bashism in source/build-and-provide-package
| line 41 (trap with signal numbers):trap bailout 1 2 3 3 6 9 14 15
Drop "possible bashism" from source/git/post-receive

The checkbashism warning is not really true:

| possible bashism in source/git/post-receive line 55 (test -a/-o):if [ -n "$1" -a -n "$2" -a -n "$3" ]; then

but let's get rid of it anyway...
tap_tool_dispatcher: ignore .git directory as well

Stuff like:

| possible bashism in source/.git/hooks/update.sample line 40
| (test -a/-o):if [ -z "$refname" -o -z "$oldrev" -o -z "$newrev" ]; then

is pointless.
tap_tool_dispatcher: use .tap suffix for output files

See https://issues.jenkins-ci.org/browse/JENKINS-15813 ->

| If the file type is considered as binary by Jenkins webserver
| then the TAP plugin doesn't consider this file for inclusion in
| TAP reports. This can be quite confusing and if you're not aware
| of this issue it can easily hide problems.

So don't use just "$filename" but always "$filename.tap" instead.
Do not checkout HEAD, checkout the Branch that is given in jenkins
Merge pull request #32 from nexeck/pr/checkout_jenkins_branch

Do not checkout HEAD, checkout the Branch that is given in jenkins
generate-git-snapshot: make sure we're building the requested version via dpkg-source

If we are changing back to the previous branch before running dpkg-source
then we always build the latest version instead of the requested one.
So make sure to actually generate the tarballs and *then* switch back
to the original GIT_BRANCH.
generate-git-snapshot: support $branch as alternative to $tag

When switching from svn to git the configuration might include
the "branch" parameter for the Jenkins build, easify migration
path.
refactor generate-git-snapshot

* modify the changelog when building "$branch", otherwise the
  package version wouldn't increase and look like a tag [closes #38]
* when using "none" as tag setting then ignore the request for building
  from tag, this supports Jenkins jobs with "branch" *and* "tag" setting
  but having "tag" set to "none" as default
* support setting $SOURCE_DIRECTORY instead of hardcoding "source" as
  default source directory
* follow symlinks when restoring debian/changelog so the file gets
  restored more reliable
* restore debian/changelog *before* changing back to original branch,
  otherwise git might refuse to do the switch if data has been modified
  in the working directory
* retrieve version information *after* checking out the according
  branch/tag, otherwise we might end up with the wrong version number
* move code into functions

Development sponsored by Sipwise.com.
Update copyright information in LICENSE file
support autopkgtest

Implemented as follows:

* build-and-provide-package uses the new pbuilder-hookdir directory
  by default. The pbuilder-hookdir script B20autopkgtest runs the
  actual tests using autopkgtest iff debian/tests/control is
  present in the Debian package, otherwise skipping the test
  execution so behaviour of build-and-provide-package is the
  same as before.

  The hook directory defaults to /usr/share/jenkins-debian-glue/pbuilder-hookdir/
  and can be configured by the $PBUILDER_HOOKDIR setting.

  To skip any autopkgtest output handling the $SKIP_AUTOPKGTEST_RESULTS
  configuration can be set.

* build-and-provide-package: copies autopkgtest output into
  directory 'adt' for later processing via adtsummary_tap

* adtsummary_tap: this script generates a TAP report of
  the autopkgtest output, usage inside a Jenkins job as shell
  executer step like:

  mkdir -p report adt
  touch adt/summary # do not fail if no autopkgtest run took place
  adtsummary_tap adt/summary > report/autopkgtest.tap

  and using 'report/*.tap' for Post-build action "Publish TAP Results".

It's recommended to use a recent version of autopkgtest. The
one provided by Christoph Berg <myon@debian.org> at
http://apt.postgresql.org/pub/repos/apt/pool/main/a/autopkgtest/
(autopkgtest_2.2.3.pgdg+1 at the time of this commit)
is known to work fine and also includes a bugfix for:

| TypeError: coercing to Unicode: need string or buffer, instance found

which is reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696625
Please note that autopkgtest isn't required on the system providing
cowbuilder but instead *inside* the cowbuilder environment.

Thanks to Christoph Berg <myon@debian.org> for his initial work on
autopkgtest support in jenkins-debian-glue and his permission to
integrate it in the mainline project.
generate-git-snapshot: prepend "origin" when checking out a $branch

otherwise we might be checking out a branch which doesn't exist locally yet,
failing with:

| fatal: git checkout: updating paths is incompatible with switching branches.
| Did you intend to checkout '$BRANCH' which can not be resolved as commit?

Thanks: Stefan Schlesinger <sts@ono.at> for the bug report and testing
Adding freight support to build-and-provide-package
Add UDebComponents. Needed by some packages.
Merge branch 'sts/freight_support' of https://github.com/sts/jenkins-debian-glue
Support configuration of release repository via $RELEASE_REPOSITORY

Thanks: Marcel Beck <nexeck@outlook.com> for the initial patch in
pull-request 34 which triggered development of this feature
Provide configuration example for REPOSITORY in default config
Bump Standards-Version to 3.9.4
Release new version 0.5.0
invoke 'reprepro include' cmdline with --ignore=uploaders

Quoting https://github.com/mika/jenkins-debian-glue/issues/36 ->

| If Jenkins tries to upload in an existing repository that have an
| Uploaders: configuration, it will fail because the keys are not
| signed. The simple fix is to pass --ignore=uploaders to reprepro
| include or to sign packages when building them.

As documented in the reprepro manpage:

| Uploaders
|    Specifies a file (relative to confdir if not starting with a
|    slash)  to  specify  who  is  allowed  to upload  packages.
|    Without this there are no limits, and this file can be ignored
|    via --ignore=upload‐ ers.  See the section UPLOADERS FILES below.

Closes: #36
Thanks: anarcat for the bug report and suggestion