Nonarray assignment regression for boolean indexing and 1d unsafe casting

There are two commits here, and only the first one is probably interesting (the other one is not a regression):

 1. Fix a regression that `a = np.array([1,2])`, `b = np.array([True, True])` then `a[b] = np.nan` fails (but `a[b] = np.array(np.nan)` does not as it never did)
 2. Make 1d special case with `r = np.array([0,1])`, `a[r] = 12.5` use *unsafe* casting as the rest of the assignments normally use, but still keep make `a[r] = np.nan` fail as before.

I just wanted to point out 2... point 1. is the thing that caused the gh-2870 behaviour change.

**Careful:** I did this pull request against 1.7. because there seem so many uncommited changes for `mapping.c` out there that this would just make things harder to merge if done at this time...