xz/rc: implemented range coder

The patch contains an implementation of the range coder as used by the
LZMA encryption.