The company shifted from gravity storage to lithium-ion storage — and after years of turmoil, secured infrastructure financing in October.