Move token encoding to ExpressionEncoder.

Summary:
 - Merge token encoding in ExpressionEncoder.
 - Update and simplify query engine tests.

Test Plan:
> make
> make test

Reviewers: radu.hambasan, dhasegan

Reviewed By: radu.hambasan

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