No longer use generic approach for unpacking values

Perform the bit shifting and masking for each value instead of having a
generic structure unpacking loop. This is easier to read and also
faster.
Drop unused compatibility code
Fix Python 2.6 compatibility