Generalizing Murray's law: An optimization principle for fluidic networks of arbitrary shape and scale