SWIG interface update for Random methods sample and shuffle.

See numenta/nupic.core#197
Perhaps a personal preference, but I don't like to separate a check and the resulting action by a body of code, because it makes it more difficult to follow the code and also adds extra nesting. Why not something like this:

```
if (!PyArray_Check(obj))
{
  PyErr_SetString(PyExc_TypeError,
                  "Unsupported type. Expected Numpy array.");
  return NULL;
}

PyArrayObject* arr = (PyArrayObject*) obj;

. . .