Add implementation for a stored CompactIntArray.

It requires a small modification to the interface since we want the
stored array to be closeable.

The test is extended to test both implementations.

Change-Id: Id1f8b885c4897d15dead6224b179b921c58266ef
Move Dictionary impl. to new package.

Preparing for memory and file based implementation.

Change-Id: I0e30f2e933c94008ead6a9a5278fc9cda84baf91