utils: added alignment functions for bit_coder.
trie: fixed the states encoding and decoding.