translate.c: Some minor code tweaks.

* Consistently compare format2index() return value so matrix_get() cannot
get passed negative values.

* Optimize ast_translator_best_choice() to defer initializing things until
needed.  Also cached the matrix_get() return value rather than repeatedly
calling it.


git-svn-id: http://svn.asterisk.org/svn/asterisk/trunk@401039 f38db490-d61c-443f-a65b-d21fe96a405b