Use class parameters in carbon.conf

carbon.conf can be customised and the following values can be set using
class parameters:

* MAX_CACHE_SIZE
* MAX_UPDATES_PER_SECOND
* MAX_CREATES_PER_MINUTE
Support running graphite svc as any user

Added parameters to select what user carbon cache and graphite run as.

Yasser
Force stop/start of graphite services

Setting `hasrestart` to true for the serice resource, prevents the
service from picking up changes made to the user used to run the
service. This commit sets it to false to ensure a change in user is
correctly reflected in the running process.

Yasser
Use Exec resource to manage graphite storage

The Graphite storage directory can grow very large, trying to manage
large directories with Puppet File resource can lead to memory issues.
The exec implementation will only trigger if changes have been made to
the init scripts (where the user is defined) and uses xargs to parrelise
the chmod. So this shouldn't have too much of an impact on Puppet runs.

Yasser
Include creation of whisper dir

Graphite whisper dir also created

Yasser
Fix incorrect variable validation

The assertion (validation) was checking against an incorrect variable
name.

Yasser
Fix lint error for graphite module
Support use of Debian/Ubuntu packages

The default behaviour of this module is to install graphite (and
related services) with Python Pip. This commit enables support of using
Debian/Ubuntu packages in addtion to Python Pip.

In theory this should also work with other distros as it uses Puppet
Package resource (and package names can be specified). However this has
not be tested.
Fix lint and parser issues
Move user and group defaults to params.pp
Add docmentation to Class ::graphite

Additonal parameters added to the class, added documnetaion for the
parameters.
Fix params.pp

Syntax errors
Updated Rspec tests

Rspec tests updated to include tests for added features:

- Managed Graphite user and group
- Install from OS package, using Package resource.
Apply ownership changes to webapp dir

Change of ownership should also be applied to webapps directory. Also as
part of this commit, I have used var $root_dir instead of hardcoded
path.
Fix exec command to change ownership

Explicitly specify webapps dir
Simplify out of scope var lookups for config.pp

Lookup out of scope vars in config.pp rather than in the template for
user and group. This simplifies support for multiple versions of Puppet,
making the variable lookup local in the template.
Correctly update carbon.conf file

Class parameters exist to modify carbon cache file, that was not
correctly being set. Also included rspec test to make sure this happens.
Remove deprecation warnings

Correctly append '@' to variable names in carbon.conf template
Sanitize find command

Use print0 in find command and -0 for xargs when chown'ing files and
directories. Prevent in odd characters in the file or directory name
causing any issues.
Fix pip installation path and add path for exec

Added options for pip to ensure that python packages are installed into
the correct location. Couple of other fixes in this commit:
 - Add path to exec statement used to chown directories
 - Ensure that ${root_dir}/webapp/graphite is created