Fix NiceValueToThreadPriority failing on an unknown nice value.

Previously, NiceValueToThreadPriority assumed that the nice value of a
process is one of the predefined set of values, and reached NOTREACHED()
when the user set any other nice value.

This patch fixes this issue by changing the lookup of the priorities
more graceful. Now the function chooses the most reasonable priority
from the given nice value.

BUG=558314
R=gab@chromium.org

Review URL: https://codereview.chromium.org/1870033002

Cr-Commit-Position: refs/heads/master@{#387280}
3 files changed