Format pages-metadata.edn before saving

The logseq/pages-metadata.edn file is now formatted as a single line which means it’s impossible to track git history in the file (every change to any page causes the one line to change => full git rewrite of the file).

I suggest pretty-printing it before saving, ideally sorting the array and object keys deterministically. This will make the changes to the pages-metadata.edn limited to only the pages we changed instead of always changing the whole one line.

This also makes it extremely hard to merge two git branches - which unfortunately happens a lot because logseq often fails to commit pages-metadata.edn on exit.

This problem makes it impossible to run logseq on two different machines if you’re using git to manage logseqdata. Sorting is definitely required since this is essentially a hash table dump.