ENH: larger fixes for np.delete and np.insert functions

There were several smaller to larger problems for these two functions,
that this addresses:
  * delete did not handle out of bound values graciously (ignoring negative
    ones)
  * both were unnecessarily slow due to use of sets
  * insert did not handle unsorted indices correctly

Further changes:
  * Add FutureWarning for boolean obj, so it can be handled similar to a
    boolean mask with indexing.
  * Add FutureWarning to remove inconsistent special cases for 0-d arrays
    (neither insertion nor deletion along an axis make sense for a scalar)
  * Allow insertion of an array with more then one element along axis when
    obj is a sequence with a single item. (i.e. array([1])).
  * Reintroduce speed optimization for scalar in insert that existed in 1.6.
FIX: insert/delete fixes and warnings for non-integer indices
TST: New tests for insert/delete covering warnings and corner cases
MAINT: np.delete keep old out of bound/negative index behavior
DOC: Fixup of delete/insert changes in release notes
FIX: rename xrange to range in python 2

np.delete abuses range to calculate start/stop/step and len. This
would create potentially large intermediates if it was a list, so
for numpy/lib/function_base.py and python < 3, use range = xrange.
2to3: Skip buffer fixer.

The buffer object is replaced by memoryview in Python >= 3. The memory
view object has also been backported to Python 2.7. However, the only
use of `buffer1/1memoryview1 is in `numpy/core/tests/test_unicode.py`
and there it is already version dependent: `memoryview` is used if the
Python version is >= 3 and `buffer` is used otherwise.

Closes #3043.
Merge pull request #3226 from charris/2to3-apply-buffer-fixer

2to3: Skip buffer fixer.
2to3: Skip `funcattrs` fixer.

In Python 3 the func.func_name attribute is replaced by the
func.__name__ attribute. The only file affected by this is
doc/sphinxext/numpydoc/phantom_import.py, and there its use
is already version dependent.

Closes #3054.
Merge pull request #452 from seberg/enhdel

ENH: delete and insert generalization and speed improvements
Merge pull request #3227 from charris/2to3-apply-funcattrs

2to3: Skip `funcattrs` fixer.