Modify mpl_image_to_rgba to allow RGB input image

mpl_image_to_rgba produces a image of shape (M, N, 3, 4) when the input
image is already RGB. This is understandably confusing for downstream
processes, and this commit fixes it.
Merge pull request #802 from jni/allow-rgb-save

Modify mpl_image_to_rgba to allow RGB input image