Removed unused variable (Dan Wittenberg)

...and got rid of compiler warning at the same time.
Added compiler flags in RPM spec file to reduce compiler noise (Dan Wittenberg)

Here's another update to the nagios.spec that puts back something I
removed due to complaints it broke el5 builds and didn't have time
before 4.0 to fix the right way. It basically allows el6 based
systems (with newer gcc) to suppress some of the dumb warnings
during compile time, so easier to spot real issues.
Reverted commit f99a9a7b which set check_interval to 1 if it was configured as zero.

Setting check_interval to 0 is useful when you don't want to perform
scheduled active checks, but want to allow on demand checks.
Updated Changelog for 4.0.1 release
Updated version for 4.0.1 release