BUG: Only convert 0d arrays to scalars in power

Operations such as `x**array([2])` would convert the
2 into an integer and loose the dimension information,
because the array (at this time, it is deprecated),
supports `__index__` even though it is not 0-d.

This fixes it, by not trying the index machinery
when it was an array, since it is unnecessary.

Closes gh-4145
DOC: add fixed issue 4145 to release notes
Merge pull request #4419 from juliantaylor/scalar-0d

backport 0d array power fix to 1.8