Add a module for rake task object utilities

This is the beginning of hopefully providing some logic to the madness of the
utilities in the packaging repo.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Rename 00_utils.rake to 01_utils.rake

We will be adding a monkey_patches.rake file, and to ensure it gets loaded
first, we have to display the long-standing initial utils file, 00_utils.rake.
00_utils.rake becomes 01_utils.rake to make way for 00_monkey_patches.rake.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Add 00_monkey_patches.rake with Rake::Task#unshift method

This commit adds 00_monkey_patches.rake, which will be a file containing any
monkey patches we need. Initially, this contains Rake::Task#unshift, which is a
method that is based of the existing Rake::Task#enhance method. Rake task
objects contain an @actions variable, which is an array of blocks that are
executed when the #execute method is called. These blocks are normally created
by the common `task :name` syntax. Under the hood, Rake calls #enhance on the
task, which builds the task by appending a block passed as an argument to
tasks workflow, which is not to append to execution blocks, but rather prepend.
That is, we want a block to fire off before a tasks existing actions. This is
what the #unshift method provides. Similar to Array#unshift, this method
inserts a block at the beginning of the array of blocks to be executed by a
rake task.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Update spec tests for renamed 01_utils.rake

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Add a test for Rake::Task#unshift

This commit tests that the monkey patched #unshift method does indeed insert an
execution block before a Rake task's existing blocks, so that when that task is
executed the block passed with #unshift is executed first.

Signed-off-by: Moses Mendoza <moses@puppetlabs.com>
Create BuildManager class and move post methods into it

This commit creates a TaskOrchestration::BuildManager class, which will
encompass the behavior of posting start and result class to the build server.
It has instance variables for the job_id, timeout, count, ref, downstream job,
and management server. This is another step toward moving the packaging repo's
functionality into discreet classes. This commit also slightly refactors
@branan's original post methods to behave from within the class instead of as
global methods availble to rake.

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