Copies all properties from a given object into another object.