Tries to make the hashrate json more sane

To make parsing the resulting json easier, it's better to separate the 'intervals' key from the actual interval ones (because they are different in content). This is a patch that tries to do it. Review is HIGHLY recommended because my PHP is at least 5 years old.

basically the change tries to make the json that looks like this (just an example, not real json):

```
[
  string(intervals): [ array of ints (interval values)],
  int(interval): [ map of ints and strings (interval stats)],
  ...
]

to this

[
  string(intervals): [ array of ints (interval values)],
  string(values): [ 
    int(interval): [ map of ints and strings (interval stats)],
    ...
  ]
]
```

Basically so child keys have the same type, always.