Start refactoring metadata

Factor code that assumes out metadata is flat out of build_lib.sh and dev into flat_metadata.sh.  This is the first step in moving the crowbar release metadata into its own git repository.