added sorting, renamed events.js to widgets.js, refactored some functions

Refactored array access and extra functions to widgets.js
Renamed events.js to widgets.js for refactoring
Changed browser dist script to reflect new name
Refactored script html in all examples to reflect new name
Added sorting algorithms to widgets.js
Moved json path extraction function from highcharts widget to widgets.js
Added frequrency/count sorting to facet values and co-occurence widget