prepare for moving pack/unpack codes.
- simplify flags.
- change pack/unpack signature to fix use.
- remove ensure_size(), use new lb_atpos() interface.