Bug 900399 - Make camera image size restriction customisable

1. add `getPreferredResolution` function to query the value of `_preferredImageResolution` from settings. (key `camera.image.preferredResolution`)
2. update some function and variable names of the original `getPreferredSizes` function to make code consistent.