SWIG interface update for Random methods sample and shuffle.

See numenta/nupic.core#197
I considered that, but in this case we want to allow this to be extended to support types other than numpy arrays. The check here isn't checking an invariant condition but rather distinguishing between acceptable types. So if we extended this to support Python sequences in the future it would look like this:

```
if (PyArray_Check(obj))
{
  // it's a numpy array!
}
else if (PySequence_Check(obj))
{
  // it's a Python sequence!
}
else
{
  // unsupported type!
}
```

so the current form will make it easier to extend in the future.