Add ability to read from options file to check_mysql_query.c

This is the same code that was added to check_mysql.c in 5ed7194.
Add additional usage data for new options in check_mysql_query.c
Make check_ide_smart default to nagios output

check_ide_smart was originally a smard control utility later converted
to a monitoring plugin. the -n option (Nagios check) should therefore be
the default.

This patch deprecates the -n and -q switches, and make the other
switches return nagios-compatible output (they are most likely used in
eventhandlers, but returning nagios-compatible output makes it clear and
easy to handle the return status)
Remove accidental tabs inserted in macro
Disable SMART test commands in check_ide_smart

check_ide_smart could disable offline auto tests but could not re-enable
them. For this reason all SMART command modes have been disabled

The disabled commands are -0/--auto-off, -1/--auto-on and
-i/--immediate
Fix misleading option text

As soon as a device is specified without using -d, anything else on the
command line is ignored.
Enable extra-opts by default
fix smart attribute comparison

Each S.M.A.R.T. attribute is compared against a threshold. If it is LESSTHAN
that threshold an error is reported.  This patch fixes the problem, that
attribute values EQUAL to the threshold are reported as error, which is wrong.
Only LESSTHAN the threshold is an error.

For more information see: http://www.hdsentinel.com/smart/index.php

My SSD has some attributes which value and threshold are "0". Without the patch
this is reported as errornous.

ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
...
172 Unknown_Attribute 0x0032 000 000 000 Old_age Always - 0
174 Unknown_Attribute 0x0030 000 000 000 Old_age Offline - 13
177 Wear_Leveling_Count 0x0000 000 000 000 Old_age Offline - 0
...

See also:

* http://sourceforge.net/p/nagiosplug/patches/365/
* https://bugzilla.redhat.com/913085
Remove obsolete check_ntp.pl
Update comments

1. libtab is now bundled, so suggest to enable it rather than install it
2. "parse-ini" feature has been called "extra-opts"
Use access() instead of stat() in parse_ini.c
Making AVG_NUM configurable by compiler define (Submitted by Lars)

A minor change which makes the AVG_NUM configurable by compiler define.
Partly Closed #956 and Closes #1166
Fixing bug in average calculation (Submitted by Lars)

The more important change: A fix for a bug which caused the check_ntp_time
and check_ntp_time check to always take the first response from ntp and not
the avarage since "j" is not increased anywhere. "i" should be used there
instead.

Partly Closes #956 and Closes #1166
Closes: #1089
check_ping: Fixing "time of day goes back"
by Geoff Oakham <goakham at oanda.com>

Patch of check_ping that allows it to gracefully handle when ping outputs
to stderr "Warning: time of day goes back (-XXXXus), taking countermeasures."

Closes: #809 and #1195
check_file_age: support for --ignore-missing

Patch to provide for a -i | --ignore-missing option. This allows files that
don't exist to be monitored for without causing an error. The use case is:

* one process periodically pushes files to an "input" queue for a second
  process
* the second process, when running cleanly will "consume" (process and remove)
  these files

So the conditions to meet are:
1. If the file doesn't exist, that's fine (OK)
2. If the file exists, but is less than X seconds, that's fine (OK)
3. If the file exists, but greater than X seconds, no good (CRITICAL)

Since now check_file_age doesn't permit this behavior, as a non-existent file
is considered CRITICAL.

Test case was contributed by our lovely Holger.

Closes #1181, Closes #989, Closes #862, Closes #1187, Closes #845
Closes Debian Bug #496307
Rename ENV variable, keep backward compatibility

Rename NAGIOS_PLUGIN_STATE_DIRECTORY to MP_STATE_DIRECTORY
Clean up parse_ini error messages, add missing newlines
Ignore MP_STATE_DIRECTORY in suid plugins

If a plugin still has suid privileges at the time np_enable_state() is
called, the MP_STATE_DIRECTORY environment will be ignored.

There is no need for a NEWS entry as no suid plugins use np_enable_state
yet.
Fix tests with an empty NPTest.cache file

The NPTest.cache cannot be loaded when empty, and this prevents
getting the data and populating the file. This patch skips the file when
empty as if it didn't exist.
And release notes for previous change (MP_STATE_DIRECTORY)

The change has also been updated in
https://www.monitoring-plugins.org/doc/state-retention.html