utility function to create a object with new set of attributes

create(x, what, attrs = NULL, ...)