Update BackwardRefsWithLocalCache.

Update BackwardRefsWithLocalCache to do in-place update of backward
references w.r.t local color cache index.

No impact on the compression density or compression speed.

Change-Id: Ie066251464c3928c044e037b43df3af28b48ca30
Move static method definition before its usage.

Change-Id: Id766c2bea92e7ebf0de65046f73429b74b4fdda4