3M posts record sales, earnings