Unify set_contexts() function for encoder and decoder

Remove the separate implementations of set_contexts() in encoder
and decoder.

Change-Id: I9f6e9b075532faae0f74f885d9443589254258a7
7 files changed