Growth Mechanics: General principles of optimal cellular resource allocation in balanced growth