Nonpolynomial closed string field theory: Action and its gauge invariance