lrc: issue during the saving of a new account
Issue generated from Tuleap's migration script. Originally submitted by: Stepan Salenikovich (ssalenik)
From: https://gerrit-ring.savoirfairelinux.com/#/c/3342/2
* The username field of new RING account wasn't fully validated
* id() was called before the account is saved, this is invalid
* The codec model, when saved, set the account back into modified state
There is still some issues to be solved in the future:
* Saving codecs and credentials before the account id is set wont work
* The daemon certificate API need an account, it doesn't exist until the account is saved, causing no certificates to be saved
* The profiles is saved too early and have an empty account ID, this cause an orphan account on the next start