javascript loop optimizations when processing series/data

Move some graph related function as part of MetrilyxGraph object to enable the possibility of using this.
Change for ... in on array to simple for for better performance. (http://jsperf.com/for-in-vs-for-loop-on-array)
Added false to addPoint and setData functions calls to prevent useless graph redraw ... we call an explicit redraw later.
Some JavaScript syntax correction.