Modifies a string to make it suitable as an attribute name. Replaces any deemed special characters and spaces by underscores, and remove leading and ending underscores from the name. Note that leading underscores are reserved for non user/internal attribute names.