Most of these fixes involve calls to BOOST_FOREACH to iterate over a map or unordered_map where the
iterator type didn't perfectly match the internal type, so a reference into the map couldn't be created
and a new value/content pair had to be created for each iteration.
directories.
1) Some fields are never put in metadata, like Indexes, PreviousTxnID, and
others that are useless/redundant
2) Directory nodes now contain a RootIndex field so you can tell which
directory they're part of.
3) Some fields are always put in metdata, even if they don't change, like
RootIndex. So if a directory entry node is touched, you can tell what
directory it was part of.
Note that this change will cause ledger divergence. Also, existing directory
nodes will not be fully metadata indexed but newly-created nodes will be.