TableEditor: don't use REPLACE to update the content of a row.
REPLACE deletes the row and then insert the new value. If the content of
the row is used as a foreign key by another table, this leads to a full
cleanup of all the entries that point to the deleted row... and when you
update the 'x' account_type, this removes all the accounts.
This also fix some minor programming errors:
* let XDB perform the escaping, don't use addslashes manually.
* don't call XDB('machin = {?} AND ' . $someStringContainingUserInput, $myvalue)
(this is not critical since the placeholder is before the
'random' string, but this can lead to errors if the 'random' string
contain a placeholder {?}).
Signed-off-by: Florent Bruneau <florent.bruneau@polytechnique.org>