Reimplement Package Merge algorithm

* src/encode.c (package_merge): Rewrite from scratch.
Add prefix coder sanity check

* src/encode.c (make_code_lengths): Verify if Kraft's inequality is
  satisfied.
Avoid compiler warnings in Package Merge mode

* src/encode.c (make_code_lengths): Define V only when it's used.