Change attribute_rename() to rename(), support renaming dimensions, and add a docstring.