Writes the summary to disk.
The summary is only written if changes have occurred.
a StoreSummary object
0 on succes or -1 on fail