refactoring of graph generation

replace multiple scripts with one parametrized

gengraph.py takes 3 parameters:
sensor ID
period for graph drawing
output file

One should note that the period parameter is fed
directly to sql 'where' clause so it can be a attack
vector..

Signed-off-by: Jukka Laukkanen <jukkalau@gmail.com>