[WIP] #Turkey Badge metrics endpoint

This adds an endpoint at /badgecounts that provides a JSON listing of each badge that is contained in at least one public collection, along with a count of publicly displayed instances of that badge (unique instances, so the same badge in multiple collections of a single user will still only count as one badge).  The badges are grouped by the url in badge._location, so the JSON looks something like:

```
{
  "badges": [
    {
      "badgeUrl": "http://badger.openbadges.org/badge/meta/a-summit-test-badge",
      "count": 1
    },
    {
      "badgeUrl": "http://badger.openbadges.org/badge/meta/mozfest-reveler",
      "count": 2
    }
  ]
}
```

This is extremely WIP right now.  I mostly just wanted to get this out there to get feedback on whether I've made some grievously incorrect assumptions.  In particular, I'm not sure this is the correct way to determine whether two badge instances belong to the same badge class.  I'm also not a fan of the endpoint "/badgecounts", though unfortunately there is already a "/stats" endpoint.

This also includes a change to mysql_base.js, to allow query criteria to include arrays of possible values (to create queries like "SELECT * FROM GROUP WHERE ID IN (1,2,3)").

Caching of the /badgecounts response has been added, to prevent hitting the database repeatedly.  An optional config variable has been added to control how long the data should be cached before being refreshed.  It defaults to 60 seconds if no value is provided.

```
badgecount_cache_second: 60
```

yo, fixes #871 


![turkey](https://i.chzbgr.com/maxW500/6784711424/hBD000CD9/)