Structures of closed and open states of a voltage-gated sodium channel