Fix Strict warning `Attribute already exists`

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30446

**Test Instructions**

1. Crate new JFormField with class = "" and required = true
```PHP
$form = new JForm('');
$addForm = new SimpleXMLElement('<form />');
$field = $addForm->addChild('field');
$field->addAttribute('name', 'test');
$field->addAttribute('type', 'text');
$field->addAttribute('class', "");
$field->addAttribute('required', 1);
$form->load($addForm, false);
```

2. Print out the form
```PHP
print_r($form->getLabel('test'));
```

3. see
```
Warning: SimpleXMLElement::addAttribute() [simplexmlelement.addattribute]: Attribute already exists in \libraries\joomla\form\field.php on line 344
```