Only ask once for rescan at preference close

Only ask to rescan the library if the user is done editing the
preferences.