Save backend id in settings earlier

Many apps, especially mobiles, are not closed but killed. In such case
BackendHelperContext dtor was not called and backend id was not saved.

Change-Id: If9e30faf9cc521ad74001d9fdf5e659f7605e7ed
Reviewed-by: Caroline Chao <caroline.chao@digia.com>