lzma: reorganizing codecs

The LZMA decoder has codecs on several levels. The upper level codecs
built on the level below.

The first level is the bit range codec used for encoding and decoding
of single bit values.

At the next level there are codecs for values with a fixed number
of bits.

This commit implements a direct codec that encodes values with a fixed set
of bits and the constant probability of 1/2.

The commit also reorganizes the rance codec source code putting the
important code at top of the file.