Allow changing the identifier of an identity after initialisation

This causes the signon identity to be reset and reinitialise.
Make Account and ServiceAccount more robust

Previously, there were circumstances (due to identifier changes after
initialization) where a null account pointer could be dereferenced.
Only take ownership of filters/sorters if they have no parent

Previously, the social network interface would delete any filter which
was assigned to it, on later assignment or clear.  This commit ensures
that it only does so if the filter had no parent when it was assigned
initially.