check_ssh: check protocol

It would be useful to be able to detect the protocols supported by the remote
ssh server to locate any using the insecure ssh v1 protocol. This patch
attempts to match against the protocol string in the ssh response.

Example:

check_ssh -H my.host.com -P 2.0
--
Just turning attached patch of github issue #780 into a push request.
(Closes #780)
Merge pull request #1261 from sni/master

tests: always build and test on travis
Include common.h before any system headers.

This should fix some problems building on AIX.
plugins/check_apt.c - Print uninitialized ereg

Coverity 66531 - ereg.buffer can be printed without being initialized if do_include and do_exclude are null and critical is an invalid regex. While minor this may leak memory and cause undefined behavior.
plugins/check_real.c - recv string null terminate

Recv into buffer is not properly null terminated prior to strstr and possible other string functions expecting a null termination. Simply take bytes received and use as an index to append \0 after. We are creating buffer[] with size of MAX_INPUT_BUFFER and recv with MAX_INPUT_BUFFER-1 so this should never overflow.
plugins/check_ntp.c - Verify struct from response

Coverity 66524 - req.data is not neccessarily null terminated but still feed to printf statements. This both does that, and verifies the struct more so than before. - SR
plugins/check_http.c - leakage fix

Coverity 66514 - Possible leakage and overflow with addr in redirect functionality. Not confirmed as null terminated, and externally gathered. Restrict string comparisons and duplications by size. - SR
plugins-root/check_dhcp.c - array out of bounds

Coverity 66488 - offer_packet->options has a max size of 312. It was being used in a loop verifying less than 311, but increasing by 2 per loop, causing a possible array index out of bounds. Changed to checking less than max length - 1. - SR
plugins/negate.c - Reorder if statement, aiob

Coverity 66480 - Potential array index out of bounds, since result was not verified to be positive prior to using as an index for state[]. Simply reording the if statement should resolve the issue. - SR
plugins/negate.c - Function should not return.

Coverity 66479 - validate_arguments has no need to return anything, as it dies on error, yet was set to return an int. Set to void to resolve warning.
lib/utils_cmd.c - Free file descriptor

Coverity 66502 - File descriptor fd in cmd_file_read is never closed, and thus file is left open after usage throughout runtime. - SR
check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.
check_dns: add warning and critical thresholds to perfdata
check_dns.c Added a bit more logic to thresholds

Added two if elses to cover when only one threshold is set.
tests: added check_dns performance data test

Signed-off-by: Sven Nierlein <sven@nierlein.de>
Merge pull request #1263 from waja/coverity_fixes

Serveral coverity fixes from nagios-plugins
Merge pull request #1264 from waja/check_nt_units

check_nt.c - Changed 'Mb' to 'MB' in MEMUSE.
Merge pull request #1262 from waja/fix_aix

Include common.h before any system headers.
Merge pull request #1190 from waja/github780

check_ssh: check protocol