Heineken is to sell Hartwall to Denmark's Royal Unibrew for EUR470m (US$613m) in a deal expected to close before the end of the year.