Improved ZigZag encoding.

- simplified calculation (branchless code);
- now it only used with signed types (it only makes sense there).