Nearly 500 jobs are expected to be lost when craft beer giant BrewDog is taken over by an American cannabis firm.