The gravitationally unstable gas disk of a starburst galaxy 12 billion years ago