Make tokenlimiter capable of getting rates from a request header

Ratelimiting middleware can be configured to retrieve Rates to be applied to requests. To do that one needs to pass a **ConfigMapper** function in an **Options** struct to the **NewTokenLimiterFromOptions**. The function should map an http request to a JSON string that configures token buckets for it. There can be configured several token buckets for a request. A request will be allowed by the middleware if all token bucket allow its consumption. The JSON token bucket config should look like this:
```json
[{"PeriodSec": 1, "Average": 10, "Burst": 20},
 {"PeriodSec": 60, "Average": 100}]
```
It seems like you can add two helper functions here:

`func indexOfSpec(period time.Duration) int`

and 

`func indexOfBucket(time.Duration) int` 

and use them what would make the code easier to read, what do you think?