Gravar-mail: Optimality of the genetic code with respect to protein stability and amino-acid frequencies