TSLA secures $30B in new credit capacity as it prepares for higher capital spending on AI, robotics and new vehicle programs.