saveAccount
Save an account.
The account's ID is read from attribute "id". If that attribute is missing, a new pseudo-random ID composed of 16 alphanumeric characters is generated.
If feature Multiple Accounts is provided and the specified account XML has ID of an already existing account, that account is replaced and its account index is preserved. Otherwise, a new account is created with account index equal to getAccountCount.
If feature Multiple Accounts is not provided and there is an already existing account, it is replaced.
If a new account is created, or an existing account is replaced and the account XML is not same as the old account XML of that account, the account is (re-)registered. Otherwise, if the new account XML is same as the old account XML, the account is kept in the current registration state.
If the account is (re-)registered, the actual (re-)registration is asynchronous. The observer is notified about any changes in the registration state as well as when the registration fails.
Return
Account ID of the saved account or null if the XML is invalid.
Parameters
The account XML.