Texas was 'seconds and minutes' away from catastrophic months-long blackouts: officials