Fix url + datetime query bug in crawler
Fix url + datetime query bug in crawler

crawler.js was only working properly on Monday and Saturday. On every
other day, the first workBatch would come back with zero messages in its
advisories properties. This was because the crawler.js script queried
dates from the start of a given date range. For example, to get the
advisories for the upcoming weekend, the script would query Saturday's
delays. To get advisories for the upcoming Mon-Fri batch, the script
would query Monday's delays.

This worked fine for future work batches, but it would fail for the
current batch. MTA rejects requests for past subway delays. If today was
Wednesday, then crawler.js would query Monday's delays. Monday is in the
past and so it triggers an error. This explains why the script works
fine on Monday and Saturday. They're both the start of their respective
date ranges, and so crawler.js would query data for the current date.

This commit changes crawler.js to query based on the end of the given
dateRange, and also adds a validation check on advisoriesByDate() to
ensure only present / future date arguments are passed in.

Fixes: #10

geoffreyyip/mta-dashboard,geoffreyyip/mta-dashboard