BUG: Fixed bug in numpy.piecewise()

Updated numpy/lib/function_base.py to fix bug in numpy.piecewise() for
0-d array handling and boolean indexing with scalars.