Add heavy-handed tests against pie chart bug

In order to avoid putting stuff in the database I went ahead and standardised the access to the `TopContextsQuery` result to use strings for the keys instead of symbols (we had a smattering of both).