12082 - systemu returns nil in some cases which causes run() to raise an exception

The M::Shell class delegates to systemu to do the double forking
and environment sanitation etc.

In cases where the command being run fails outright such as out of
memory etc systemu can return nil for the exit status

We now handle that and the MC::RPC::Agent#run method will return -1
as a status in these cases
11998 - move binaries to bin in the git repo

Restructure the repository to put bin scripts into bin and move the
redhat packaging into ext/redhat to match the debian packaging in
ext/debian.

Adjust the Rakefile, Makefile and RedHat spec for these changes
Merge pull request #20 from stahnma/master

#8045 Debian packaging Updates
6275 - mc-* in $PATH to `mc` confuses the unified-binary

The mco command supports creating a symlink called mco-foo to it which
would invoke the foo application.

The regular expression thats used to drive the logic was not strict
enough and so if the mco script was in a directory called mc-anything it
would fail.

This makes the regular expression more strict reducing the cases where
it will fail.  There is still a few edge cases but this feature is
almost never used now that migration to the unified binary is complete
so it's not worth spending much time on.
7441 - /etc/init.d/mcollective fix

The Red Hat rc script will now read /etc/sysconfig/mcollective if it
exists to allow the user an opportunity to adjust the environment.
9383 - Create an mcollective-client gem

Add support for building a mcollective-client gem using 'rake gem'

This gem does not contain the mcollective server daemon or the vendored
systemu and json but has these set as dependencies so that they are
correctly managed by the gem system as users would expect.

The gem does not include any plugins or configuration as mcollective
does not support extending itself via gems so users will have to
maintain their own.

Did some whitespace maintenance and removed the unused mail_patches
rake task
9383 - Create an mcollective-client gem

Update the changelog
9383 - Create an mcollective-client gem

Add a missing require to the Rakefile for the gem tasks
9453 - mcollective init script should not be enabled by default (at least in RH)

The Red Hat init script had LSB meta data that caused it to start at
boot time after installation by default.  This is not generally desired
behavior and against Red Hat policies.

This commit adjusts the init script so that the RPM will not enable the
service by default
12638 - mco inventory prints undefined method error when connection fails

The inventory application bypass the normal RPC libraries so it has to
do its own error handling.  It did not handle non responsive nodes well
and would print a nilClass error to STDERR.

This commit checks the result for validity and handles the situation
properly
12703 - stomp and activemq connectors should handle Stomp::Error::DuplicateSubscription

Stomp 1.2.0 introduce new behavior where duplicate subscriptions are
suppressed, this is good we do not want to duplicate subscriptions but
we should now handle the exceptions correctly

With the ActiveMQ plugin we do subscriptions that include headers, so
that one client/agent can subscribe to the same queue multiple times
but just with different sets of headers supplied.

The Stomp gem does not consider headers when tracking duplicate
subscriptions so this would have been impossible.  So we now come up
with our own unique subscription names in those cases and supply it to
the stomp gem to improve its internal tracking
12688 - inventory application pass incorrect information to the halt method

During the work for #11280 all the applications were converted to use
the new halt helper method for consistent exit codes.

This was not done correctly in the inventory application, this cleans
that up
12705 - Stomp miscerrors should be logged as error and not debug

Stomp calls a callback called on_miscerr for any unexpected error
in the logging class.  This class were logging the errors at debug
level when it should really be at error level.

This commit adjusts that behavior
12719 - DDL returns {} for unknown action interfaces but the RPC application does not handle this

When an action gets called with paramters we go through each param and
convert them where possible into the formats the ddl expect.  So the
string "1" when given on the CLI gets turned into the number 1.0 if the
DDL expects a float.

The method that did this did not handle the case where the action does
not exist and would raise a nilClass error, this adds that check
12865 - the scroller should be shown earlier

We show a progress bar while results are gathered.  The progress bar is
only showed after the first result is received which might leave the
user wondering what is going on between creating the request and
receiving the first reply.  This might be a long time in the case of
package updates etc.

With this commit we show the progress bar with 0 progress before sending
the request
12854 - Users should be able to disable and enable batch mode during the life of a client

The batch mode behavior was either on or off for the duration of the
client, if a user supplied a batch mode on the command line there was no
way for the program to decide that some calls should be subject to batch
mode and others should not.

Additionally once enabled batch mode could not be disabled again.

This commit allow the batch_size to be set to 0 to disable the batch
mode for the client.  This is allowed either for 1 single rpc call by
passing :batch_size to the rpc call as an argument or by setting
batch_size to 0 on the client object

Also adds a bunch of test coverage to previously untested code
12927 - Application#application_failure should not handle SystemExit

Users can use exit() in applications as is expected in any normal ruby
script, the application_failure handler though gets exceptions and
prints backtraces.

In some cases the application class caught SystemExit and did not pass
those to the application_failure but it was only done in some cases.

With this commit the appliction_failure method now handles SystemExit
correctly by just raising it again after first disconnecting from the
middleware.  This avoids a few cases where users might get a error
printed to their display saying the application failed to run when in
fact all that happened is that it used exit()

Also adds test coverage to code that did not have it before
12852 - RPC::Client#discover should accept :nodes as :hosts

In the past we only accepted :hosts as a argument when supplying
discovery information.  The terminology choice was unfortunate as the
official terminology guide prefers the word 'node'

We now accept :nodes as well as :hosts and treat them as equivalent, the
documentation has been updated to prefer :nodes

Additionally the discover method will now raise an error if unknown
flags are passed in as it might lead to a user causing change against
all his nodes due to simple programming error, so being very strict here
is in the users best interests.
12950 - Message#base64_decode! and Message#base64_encode! is broken

In the past the message object used @body for the message payload, this
got changed later to be @payload.  The encode base64_encode! and
base64_decode! methods was never changed to reflect this change

Additionally the tests were not good enough to pick up that a nil was
being passed to the SSL library and not the correct payload.

This fixes both issues
12859 - Application should be able to disable common options

Certain types of application will not want the RPC, Filter or Common
options.  The plugin packager is a good example as it will never need to
connect to the middleware having those options will just confuse the
users.

A plugin can now elect to disable one of 3 groups of options.

Also add some test coverage to code that was not previous tested