Summary: Fixed error from cat when trying nginx.d/* on nodes without vhosts defined

Description:
When running first time from scratch, if class was included without any setup at all
and with sane defaults, in debian squeeze generates an error when trying to collect
non existant vhosts, because cat complains that can not expand * because there are no
files.

Changed:
Added unless to check that at least there is a file in nginx.d by testing it can expand.
Moved worker_connections, worker_process and proxy_set_header to the new structure, backwards compatible

Defaults are set inside params, nginx class will set default and send it from local var to nginx::config,
so even when there is no need for set default values on nginx::config, in case someone already using
this module it's for some reason calling directly nginx::config, to avoid breaking anything defaults are
set inside nginx::config too.
Added purge support in confd.

Added confd_purge option to tell it to purge files non managed by pupet in conf.d, default is false.
Implementation of option configtest_enable which will call configtest on each
service restart, therefore if user submit an invalid configuration nginx won't
stop and realize too late that it can start again.

By default it's false, if true it assumes you will have a working /etc/init.d/nginx
which accepts configtest and restart.
Summary: Fixed error from cat when trying nginx.d/* on nodes without vhosts defined

Description:
When running first time from scratch, if class was included without any setup at all
and with sane defaults, in debian squeeze generates an error when trying to collect
non existant vhosts, because cat complains that can not expand * because there are no
files.

Changed:
Added unless to check that at least there is a file in nginx.d by testing it can expand.
Fixed merge
Moved worker_connections, worker_process and proxy_set_header to the new structure, backwards compatible

Defaults are set inside params, nginx class will set default and send it from local var to nginx::config,
so even when there is no need for set default values on nginx::config, in case someone already using
this module it's for some reason calling directly nginx::config, to avoid breaking anything defaults are
set inside nginx::config too.
Added purge support in confd.

Added confd_purge option to tell it to purge files non managed by pupet in conf.d, default is false.

Because vhost_autogen it's not actually managed by puppet but indirectly created by a puppet executed
command, it's added as ignore to avoid getting it removed.

Better formating for confd purge support

Better formating for confd purge support
Implementation of new vars configtest_enable and service_restart and their respective optional arguments.

Argument configtest_enable / params.pp $nx_configtest_enable
* Default false
* If true will set service[nginx] restart with contents of nx_service_restart.

Argument service_restart / params.pp $nx_service_restart
* Default '/etc/init.d/nginx configtest && /etc/init.d/nginx restart'
* Since nginx 0.7.53 nginx supports '-s HUP' which will reload testing configuration first, to be backwards compatible above default was choosen.

Many distributions of nginx already implement a configtest before restart, however many doesn't, and many
even don't provide restart but a stop/start combination. If configtest_enable is true then puppet will force
nginx to do a configtest no matter if it was going or not to do it itself.
Fixing merge from latest code on master plus guruhub
Merge pull request #24 from guruHub/pull_issue_20

Fixed error from cat when trying nginx.d/* on nodes without vhosts defined
Merge pull request #25 from guruHub/pull_refactor

puppet-nginx refactor to class/arguments
Merge pull request #26 from guruHub/pull_feature_confd_purge

Allow purge of confd dir as optional argument.
Merge pull request #27 from guruHub/pull_feature_cfgtest

Implementation of new vars configtest_enable and service_restart...
Added support for stub_status location

If stub_status is provided as true a location will be created to provide
nginx status information from stub_status module.
Merge branch 'guzmandev' into pull_feature_stub_status
James,

This is the best way I found to tackle the problem of custom directives, trying to
avoid common usage of module involve hacking the module/template to be able place
custom directives.

Right now support was added only for location context (default and custom ones),
it expects a hash with key value and it's supported on all current location types.

Added an example inside location.pp, usage it's pretty easy.
Merge pull request #28 from guruHub/pull_feature_stub_status

Feature status locations
Merge pull request #29 from guruHub/pull_feature_location_cfg

Pull feature location cfg