API: Treat array keys starting with '@' as XML attributes

Try and test by creating an api method with the following data array:

```php
		$array = array(
			'array' => array(
				'@version' => '3.0',
				'key' => array(
					'@attr' => 'attrvalue',
					'key' => 'value',
					),
				'key' => 'value',
				),
			);
```

Should produce the following result:

```xml
            <array version="3.0">
                <key attr="attrvalue">
                    <key>value</key>
                </key>
                <anotherkey>value</anotherkey>
            </array>
```