Add expression encoder for compressed index.

Test Plan: make

Reviewers: radu.hambasan

Differential Revision: http://phab.code4fun.de/D44