FIX: performance of CategoryDetailedSerializer and  Category.update_stats on large databases