elasticsearch: use ajax to get dashboards list
rules: improve error display

Use dismissible alert and write elasticsearch error in the global
error div.
elasticsearch: more asynchronous fetch

Populate rules activity via an AJAX query.
rules: use ajax to fetch rules stats
suricata: don't fire js if no rules
rules: conditionaly load dashboards via js
rules: prepare function for reuse
suricata: restore get details on rule click

It was not working anymore because the ajax callback was setup
when document was loaded. Calling explicitely the function after
populating the array.