If ships are destroyed in a space battle, ground troops are removed by the controlling player down to the carrying capacity amount.
If the DS destroys the system with the Rebel Base in it, the Imperials win immediately. It does not matter if the base is revealed or not. This was clarified by an email from the designer and is quoted in the Official Rules Responses thread: https://community.fantasyflightgames.com/topic/217120-official-rules-responses/