Reorganized gen_page_streaks()

Two function were split out of the function; the first
is sql_load_streaks() that does the loading from backend
database; the other is process_streaks() that builds
data structure for the Template Toolkit template.
Merge branch 'master' into devnull

Bring in gen_page_streaks() reorganization