Introduce Encodable class

Introduce Encodable class. The former EncodedAdt.encode function becomes
the implementation of Allocator's Encodable instance.
Add support for parametrized constraint systems

Note that the signature of the `solve*` functions changed, so some test
wont compile anymore.