Unifying metabolic networks, regulatory constraints, and resource allocation