Dual use of Cu2ZnSnS4 in solar cells and energy storage devices