Fix json output when printing legend entries

Branch 1.4 is missing this patch in order to produce valid json output.
This is related to issue #380 reported by apfeiffe.
Fix json output when printing infinity values

The printf of a rrd_value_t variable can output inf in case of an
infinity value. That inf value is not JSON valid, nor are Infinity,
NaN, Number.NEGATIVE_INFINITY or Number.POSITIVE_INFINITY.

This commit adds a test for infinity values by using isinf() and
outputs a null in such case.
Merge pull request #427 from julthomas/jth/1.4/json

Fix json output when printing legend entries
add libdbi
add lua and tcl to travis build
more travis changes ... trying to get it to build lua bindings too
Add --left-axis-format option to control labels on y-axis of graph.
Merge pull request #439 from AutoAquaria/1.4

Add --left-axis-format option to control labels on y-axis of graph.