simple_encoder: make it so we can run it in tests.

Added a limit, resolving a todo and added a limit parameter so that we
can do a very simple fast encode in 1 pass.

Change-Id: I265cd912d970d560a0b00b86e6c7ec7b6fef1e7b
1 file changed