Dates

This PR adds a key to the "date" facet called "period" that will be "DAY" WEEK or YEAR.

Couple of open issues fixed here too.

Note this PR has all the commits from 'bugfixes' too.  I can redo this one once that PR goes through, but I thought you might want to see these commits.