(CPR-54) Move deb_repos tasks into Pkg::Deb::Repo

This commit moves the content of the three tasks in deb_repos.rake into
lib/packaging/deb/repo.rb. This allows the rake tasks to be thin
wrappers around method calls and allows the methods to be tested at some
level. It also allows more code reuse in sane ways than parameterised
rake task calls.
(maint) Update rsync_* to use Pkg::Util::Execution.ex
(CPR-54) Refacter lib/packaging/deb/repo.rb

This commit makes some minor refactors to Pkg::Deb::Repo for both
correctness and cleanliness. First, all instances of find_tool with an
error are replaced with check_tool, which generates an error
automatically when the tool cannot be found. Second, sh is replaced by
Pkg:Util::Execution.ex to remove the dependency on rake in the library.
Similarly, FileUtils is required and then directly referenced in mkdir_p
calls to avoid the dependency on 00_utils. Finally, repo_urls is now
set outside an if block so that there is no need to initialize it as an
empty array. This also adds a base_url method that returns the builds
url that is shared between repos and repo_configs.
(CPR-54) Add repo_creation_command to Pkg::Deb::Repo

This commit decomposes the deb create_repos method into two smaller
methods. create_repos now calls out to repo_creation_command to generate
the command to create the repo. This will enable both methods to be
tested cleanly.
(CPR-54) Add tests for Pkg::Deb::Repo

This commit adds some basic tests for the Pkg::Deb::Repo module.
(CPR-54) Move ship_repo_configs into Pkg::{Rpm,Deb}::Repo

Rather than invoke rake tasks from the newly librarified deb repos
methods, it is far cleaner to invoke other ruby methods. This commit
breaks up the ship_repo_configs task into a Deb and Rpm version and adds
it to the Deb and Rpm repos modules. The ship.rake task is also updated
to invoke both methods.
(maint) Style points

Updates the PR for style, including:
- Space after comma
- Space after {, before }
- Parens around most method calls (except puts, raise, fail)
Merge pull request #316 from haus/ticket/master/re-1822-move-deb-rake-into-methods

(CPR-54) Move deb_repos tasks into Pkg::Deb::Repo
(RE-1040) Add OS module to detect windows platform

This commit adds a Pkg::Util::OS module and windows? method. It
also provides a DEVNULL device that maps to the appropriate value for
windows and everything else.
(RE-1040) Use PATHEXT to resolve executables

Tools like git on windows are actually named 'git.exe', so we need to
take into account path extensions when resolving them.

This commit uses the PATHEXT environment variable, which is standard on
Windows, but if it is absent for some strange reason, it defaults to a
reasonable set of extensions.
(RE-1040) Use the platform specific DEVNULL device

Use the platform specific DEVNULL device, otherwise, trying to redirect
commands to /dev/null on Windows results in "The system cannot find the
path specified."
(maint) Colorize rspec output on windows

The win32console gem is needed to colorize rspec output when running on
windows and ruby versions prior to 2.0.
Merge pull request #306 from joshcooper/ticket/master/RE-1040-base-windows

(RE-1040) Support building gems on Windows
(CPR-55) Add rubocop to the Gemfile
(CPR-55) Disable some less helpful cops for rubocop

This was largely borrowed from the puppet repo. It enables several style
cops that are disabled there.
(CPR-55) Remove Gemfile.lock and add to .gitignore

The Gemfile.lock is causing problems because we won't have the same gems
on 1.8.7 and other rubies thanks to rubocop. This commit removes the
Gemfile.lock and adds it to the .gitignore to avoid this issue.
Merge pull request #318 from haus/ticket/master/cpr-55-rubocop

(CPR-55) Add rubocop to packaging repo
(MAINT) Move git utilities into library

This commit goes through and takes all of the git based utilities in
00_utils.rake and moves them to their own ruby file in packaging. It
also goes through and finds every use of the old version and replaces it
with the new one. Finally it deprecates the old one so as to show a
warning message in the event the old one is still used. However it won't
break, just warn.