src/plugin.c: Initialize "next_read" field of read callbacks.

Fixes Github issue #230.
curl_xml plugin: Fix potential dereference of NULL pointer.

I managed to get collectd to segfault in a couple of places while
playing with it a bit. The first is in the curl_xml module when the
XPATH expression doesn't quite match the input. The crash occurs on line
407 when instance_node->nodeTab[0] is dereferenced. At this point, all
members of instance_node are 0, so dereferencing the array isn't a good
idea. This patch fixes the problem, although I'm not sure if this
particular case actually deserves its own error message.

Signed-off-by: Florian Forster <octo@collectd.org>
Add protection from infinite redirect loops to curl-using plugins

Signed-off-by: Florian Forster <octo@collectd.org>
curl_json plugin: Call yajl_complete_parse() / yajl_parse_complete() only once.

The cURL callback may be called several times, so we need to call the
complete() function after perform() returns.
Add upstart configuration file for Ubuntu, Debian and RedHat distros

Signed-off-by: Florian Forster <octo@collectd.org>
exec plugin: Fix a copy'n'paste mistake in a comment.

Thanks to Robert Riches Jr for the hint.
Fix memory leaks when plugin gets no results

Signed-off-by: Florian Forster <octo@collectd.org>
curl_xml plugin: Check for a curl_easy_perform() error first

The value of CURLINFO_RESPONSE_CODE isn't valid otherwise.
Also, use the symbolic name CURLE_OK in all plugins where
appropriate.

Change-Id: I17ae9c7eea393ee4641296b5484c93809a662dd9
Signed-off-by: Florian Forster <octo@collectd.org>
Merge branch 'collectd-4.10' into collectd-5.1

Conflicts:
	src/curl_json.c
Merge branch 'collectd-5.1' into collectd-5.2