fix analytics queries

join into episodes to ensure only existing episodes are counted
analytics: normalize some dates to midnight
analytics: more date normalizations