Before this patch, the BarManager constructor created a new DataManager instance,
leading to this.dataManager != this.barManager.dataManager. This led to effects such as
daily counts not updating in some circumstances, while total counts did.
I noticed that despite having collectStats set to false, upon vault
or plugin load, the .vault-stats file would keep coming back. This is
due to:
In the plugin onload(), a BarManager is created
In the BarManager constructor, a DataManager is created
In the DataManager constructor, the .vault-stats file is created and
then written to, regardless of the user's collectStats setting.
We add an additional check in the DataManager constructor for the
collectStats setting, propagating settings through constructors
as necessary.