Gravar-mail: Analysis of optimality in natural and perturbed metabolic networks