Export an entire dashboard in JSON

This function export the dashboard with its graphs and lines in a JSON file
which is automatically downloaded on the user's computer.
The import functionality will be added later.
Fix to hilight menu on nav bar the user is in

The Urls were badly analyzed and so, the menus were never selected.
This function tests if the menu is selected or not, looking at the current url.