An 8-bit image will most likely have its pixel values truncated. What you need to do is interpolate the missing low order bits before applying a colour transformation. There is no way to know what the missing values are, you would have to make certain assumptions, such as smoothness.
To answer your question I don't know of any image editor that offers this feature. Why not? Speed for one, the curves/levels command in most photo editors is fast enough to work in real time so you can see the effect on your image. Now you could have a separate function that operates when not previewing, but this would be a pretty high level feature, and you'd have to implement it for all operations that apply scaling to pixel values. Finally it's a problem that completely goes away if you have a camera which supports RAW and adopt a 16-bit workflow.
You can always do the interpolation yourself, e.g. by converting to 16-bit, resampling at a higher resolution, downsampling. An alternative scheme that will probably work just as well would be to randomize the lower order bits (by adding a small amount of noise). Or a combination of resampling and randomization.
Don't be too put off by the look of the histogram in your image the quantization error of that operation is unlikely to be noticeable if there is any noise in the image provided you don't have any areas with shallow colour gradients (however in cases with smooth transitions and little noise, interpolation would work very well).