What is the origin of the phrase brand spanking new?

pie