d3graph.js clean

Clean ```d3graph.js``` code:

1. remove unused code;
2. use d3.js functions to sort, compute mean, max…
3. fix css class for nodes without family or category.