Backport "Optimize the use case of token_cost table" to VP9
Backport "Optimize the use case of token_cost table" to VP9

cherry picked from nextgenv2 90ea281f29df747282e56d3068a3ddbdde30cdd0

Change-Id: Ie989e60c6479ac3251cadaac9c7e795ccba52f4e

webmproject/libvpx,ShiftMediaProject/libvpx,webmproject/libvpx,webmproject/libvpx,ShiftMediaProject/libvpx,webmproject/libvpx,webmproject/libvpx,ShiftMediaProject/libvpx,ShiftMediaProject/libvpx,webmproject/libvpx,ShiftMediaProject/libvpx