Fix Image.fromarray with NumPy arrays: Supersedes PR #224

This includes the commits from #224, and an extra ducktyping check to call the right method on image objects.