plugin/tcpconns: fix missing port number in rrd title

Closes #78
Add support for multiple types db
Add LVM plugin
add percentile support to network traffic graphs

Set $CONFIG['percentile'] to a number and a XXth percentile line + legend
will be added to all network traffic (if_octets) graphs.

Closes #81
Merge remote-tracking branch 'feandil/for_upstream_lvm'
Merge remote-tracking branch 'dhchen/master'
type/base: replace array_merge by + sign to merge a fallback array

array_merge resets the index, while in case of $this->colors and
$this->legend, we'd like to keep the index. An irq plugin sample:
array(1 => 1, 'ERR' => 'ERR') must not become
array(0 => 1, 'ERR' => 'ERR') after an array_merge.
Keep the list of plugins sorted
Use config time_range for canvas graphs
Merge remote-tracking branch 'feandil/time_range'
rm plugin.php

Forgotten in commit:
v0.3-77-gbf56a64 [remove ajax js code]
jsrrdgraph: Fix errors in second axis.
jsrrdgraph: Fix graph width to look like rrdtool.
Escape HTML in GET-provided hostname

A malicious user can enter javascript code in "h" GET parameter and this
code gets executed because this parameter is copied in the HTML output
without any escaping.  This patch escape the output before it is checked
it is valid.
type/genericio: apply percentile on scaled value
jsrrdgraph: RrdGraph.js: make HRULE support reference to variable

The value of HRULE could be a reference to for example a VDEF variable.

Closes #85
type/default: optionally draw min/max spikes in a lighter color in graphs

Closes #73
graph: don't overwrite config rrdtool_opts by rrdtool_opts from json plugin

Closes #86
Defensive programming: more urlencode/htmlentities

Make build_url return an URL, not HTML. This separates presentation
from data.

plugin_header's return value is unused, remove the unnecessary return.

At places where `printf("<tag att='%s'>", $x);` is used, it is now
converted to `printf("<tag att=\"%s\">", htmlentities($x));` since
the single quote is not escaped by default by htmlentities.

In case the canvas style is used, JS should use `textContent` instead
of `innerHTML` to avoid reading `&quot;` instead of `"`. Nobody (should)
use(s) IE6 anymore, so it is a safe change.

While at it, use the standard charset attribute of meta to specify
the character set (UTF-8).
Fix type confusion

index.php expects that collectd_hosts() always return an array for
array_diff. Since an empty array evaluates to FALSE anyway, do not
change the type and just return the empty array.

In base.php, if no files are returned, the loop is never called and
three variables are not initialized. Do it now.