Samsung posts record profit on smartphone boom