A General System Structure and Accounting Framework for Socioeconomic Metabolism