Macros: Implemented importance (hourly value) macros

This commit implements macros for the hourly value attributes on hosts
and services. There are three new macros. HOSTIMPORTANCE is the
configured value of the host's hourly_value. HOSTANDSERVICESIMPORTANCE is
the configured value of the host's hourly_value plus the sum of the
configured hourly_value values for each of the host's services.
SERVICEIMPORTANCE is the configured value of a the service's hourly_value.

This commit also increases global code reuse by creating a separate
function, clear_custom_vars, to delete a list of custom variables.
Changelog for implementation of importance macros
Aliased hourly_value to importance and minimum_value to minimum_importance

This commit aliases the host and service hourly_value attribute to
importance and the contact attribute minimum_value to minimum_importance.
This is being done to reflect the more generic nature of these attributes.
It also deprecates the use of hourly_value and minimum_value. The names
of the structure members that store these values will remain unchanged
until Nagios Core 5.
Corrected calulation of host importance and importance defaults

This commit sets the default values for host and service importance and
contact minimum_importance to zero to agree with the documentation.

It also corrects the calculation of the host importance. Previously,
the value of each service was added to the host importance when the
service was added to the list of the host's services. Then when the
determination was being made whether to notify on host problems, the
sum of all the host's services' importance was added to the total
importance again, effectively doubling the importance of each of
the host's services. Now the host's stored importance is for only
the host itself, but it's services' importances are still used to
determine whether notifications should be sent.

Finally, the config CGI was modified to display the importance of the
host itself in one column and the importance of the host and it's services
in a second column.
Bug #548: Temporary fix that rejects all external command during restart

This temporary fix will prevent Core from crashing if it receives an
external command during restart that tries to access unitialized pointers.
A more permanent fix would be to implement a retry mechanism between the
command processor worker and the main Core process itself.
Merge branch 'master' into json

* master:
  Bug #548: Temporary fix that rejects all external command during restart
  Corrected calulation of host importance and importance defaults
  Aliased hourly_value to importance and minimum_value to minimum_importance
  Changelog for implementation of importance macros
  Macros: Implemented importance (hourly value) macros
JSON Object: Added master hostgroup as selector for dependency queries

This commit adds master hostgroup as a selector for the host and service
dependency count and list queries. The master hostgroup applies to the
non-dependent host.
JSON Object: Added master service/servicegroup as selector

This commit adds both a master service and master servicegroup as a selector
for the service dependency count and list queries. The master service and
servicegroup applies to the non-dependent service.
JSON Object: Added dependent host as selector for dependency queries

This commit adds dependent host as a selector for the host and service
dependency count and list queries.
JSON Object: Added dependent hostgroup as selector for dependency queries

This commit adds dependent hostgroup as a selector for the host and service
dependency count and list queries.
JSON Object: Added dependent service/servicegroup as selector

This commit adds both a dependent service and dependent servicegroup as
a selector for the service dependency count and list queries.