Async ajax calls for some visualisations

If the dashboard contains lots of widgets/visualisations they block
eachother (javascript thread blocks) by doing lots of sync calls (page
load with 4-5 widgets could be 2-3sec). 

This change makes the rawdata and realtime widget to use async ajax (new function in api.js) instead with callback which doesn't block the javascript thread in browser - this makes the dashboard feel alot snappier and page load is about 0.5sec instead in
comparsion on my test. 

Also the widgets does not freeze during data-load (for example zooming and time range change).

There is also some jquery optimisations where the DOM-node is cached/lookuped once instead of lookedup several times every update.