[BUGFIX] Don't write LocalConfiguration on every Install Tool entry

Make removeObsoleteLocalConfigurationSettings only rewrite the
file if something has changed.

Resolves: #52437
Releases: 6.2
Change-Id: I014fa04659d1ca8435d576c85ab039a9ee0bf92b
Reviewed-on: https://review.typo3.org/24221
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring