Added grouping functionality

Added grouping functionality as described in this article: http://fishpig.co.uk/blog/why-you-shouldnt-merge-javascript-in-magento.html