Set PE_VER environment variable if this is a PE build

In the jenkins builds, we don't export the PE_VER environment variable, which
is a problem because freight keys on this to set up the dependency urls. This
commit updates the set_cow_envs method to export PE_VER if we're building PE.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Remove unneeded ||= and correct uber dependencies

The ||= for assigning ENV['PE_VER'] to @build.pe_version isn't functional
anymore. There should be no case where we pass ENV['PE_VER'] but doesn't
actually want this to get set as @build.pe_version. This commit also updates
(sorry, I know, atomic commits) the dependencies of pe:jenkins:uber_build to
include pl:fetch and pl:load_extras so that ENV['PE_VER'] is acknowledged and
its value set for @build.pe_version.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Fix debian repo creation

This commit addresses an issue where the debian package repositories created
for jenkins package builds clobber each other for each new dist. This commit
creates the originally intended behavior, which was to create a repository
for each distribution individually. It does so by creating the repositories
under $project/$sha/repos/apt/$dist whereas before they were all just in
$project/$sha/repos/apt. It also adds better error handling around the case
where we attempt to create debian repo configs when there are no repos to
create configs from.
Disable jenkins and remote builds is tree is dirty

Remote builds and jenkins builds rely on git-bundle, which creates an archive
of the repository as it stands at HEAD. Any uncommitted changes to source are
not retained in the git-bundle. This means in the case of a dirty tree, remote
builds do not actually accurately reflect the local repository. Additionally,
the suffixing of "-dirty" to the version string of builds from dirty source
trees seriously disrupts the jenkins workflow, which assumes that to retrieve
any package, you can check out the commit of that build. In the case of a dirty
build, we cannot simply check out the dirty tree that was packaged, because we
have no idea what the changes were. Not only that, but while the version string
contains "-dirty", since no uncommited changes were actually packaged, the
built package is of the last sha, which means the version string is actually
inaccurate. We can avoid all of this mess by simply preventing remote and
jenkins builds if the source tree is dirty. This commit adds a utiity method to
check if the source tree is dirty, and uses it to this end.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>