Scottish brewer BrewDog has won an appeal to maintain names and packaging for its beers, after they were found to breach the industry's code of practice.