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