Bug 889765 - [MMS] Resizing algorithm is not working properly

- Fix bug : https://bugzilla.mozilla.org/show_bug.cgi?id=889765. Refine the resizing algorithm by utilizing the quality parameter while creating the blob, and prevent the resize hanging if the quality adjusting is not working.
- Add test case to verify the new resizing algorithm work with different image format and low quality jpge.