Fix FindClosestDiscretized in near lossless:
Fix FindClosestDiscretized in near lossless:

- The result is now indeed closest among possible results for all inputs, which
  was not the case for bits>4, where the mapping was not even monotonic because
  GetValAndDistance was correct only if the significant part of initial fit in
  a byte at most twice.

- The set of results for a larger number of bits dropped is a subset of values
  for a smaller number of bits dropped. This implies that subsequent
  discretizations for a smaller number of bits dropped do not change already
  discretized pixels, which improves the quality (changes do not accumulate)
  and compression density (values tend to repeat more often).

- Errors are more fairly distributed between upwards and downwards thanks to
  bankers’ rounding, which avoids images getting darker or lighter in overall.

- Deltas between discretized values are more repetitive. This improves
  compression density if delta encoding is used.

Also, the implementation is much shorter now.

Change-Id: I0a98e7d5255e91a7b9c193a156cf5405d9701f16

webmproject/libwebp,PKRoma/libwebp,webmproject/libwebp,PKRoma/libwebp,PKRoma/libwebp,PKRoma/libwebp,webmproject/libwebp,PKRoma/libwebp,webmproject/libwebp,PKRoma/libwebp,webmproject/libwebp