Optimize query for file stats on dashboard.
Eager load association to cut down on db queries
Fix deprecation
Eager loads to optimize DB access.
Fix possible error with null values
Initialize total_files and total_file_size on creation.
Instead of using a parent method that returns the collection
make a parent association (to the collection). This allows eager
loading of the parent for eventables (assuming we define this
association on each eventable).
More DB optimization
Fix deprecations