move `map_csv` function out of view class
simplify functional content view tests and move logic tests to a DBTestCase
factor out leader query from stats view

optimize involved queries at the same time and fix bug assuming score and user
ids where the same (true so far)
factor out global_stats from stats view
move user visible metric names and ordering back into view code

(as these might need translation at some point)
add an explicit functional test for `/stats`
remove batch debug message
split test_views into distinct test modules for search/submit