Speedup persistent data

Do not read/write ini-file from disk on each access. Read it once at
startup. And write it periodically and at shutdown.
Refactor TorrentPersistentData