Make/Fix both the heap and mysql take the full config object
Make the heap prune tokens when required
Add token pruning for the mysql db
Add prune tokens tests