resourceloader: Clear module storage if disabled by configuration

To free up space for other things that might want to use localStorage
for users where it was previously enabled.

Bug: T66721
Change-Id: Idd62a5eab72ef79c47cfe54fcd5c240d1cbb0e44