Support fetching statistics and listing events from the API

Even though logs are enough to dig statistics, sometimes it might be nice to have simple statistics of how many push notifications are sent to each service and how many of them failed. Also i.e. in order to clean up expired events from the database, it might be convenient to be able to list all events that are added to the database.

These commits add two new API endpoints /stats and /events, both for 'publish' authorization level. They are documented in README, stats are collected on montly basis (UTC months) and events are listed real-time.

The pushd.coffee is not actually modified much, but it is refactored and commented for easier readability. I have tried to make sure nothing breaks, but it is always worth to double check.