Samsung Electronics extended its record run with second-quarter operating profit topping analysts' estimates.