Handle max_kb in nokia.image-processing localmsg api

I tested with several images, the size of generated image is about 10%-20% larger than the given size which I think it's acceptable.
Yeah, but this test would also cover the other conditions of the if (for example it'd catch https://github.com/andreasgal/j2me.js/pull/648#discussion_r21142264, unless the image is square-shaped)