Updated getSummaryData functions to cater for segments properly, 
refactored this function to make it readable, and added code to handle
update of document in SummaryData collection (not just insert);
Split several pieces of code into reusable functions where analysis is
to go for news feed generation;
Added standard segment for 'All visits'
Note - funnel graph still not displaying. Not quite sure why. Debugging
to do.