Filemeta json v11

Filestore/Filelog metadata output to JSON.

Worked on feedback given after a review from Victor. Hope all issues were addressed.
It looks like we set up json stuff unconditionally here, even though it seems it should be conditional. At least, thats what it appears to be later: if (flog->flags & META_FORMAT_JSON) {