Microbial tradeoffs in internal and external use of resources regulated by phosphorus and carbon availability