Py3k Fixes Part 2

* Updated CudaNdarray C extension module to compile against either the Python 2 or 3 C-API
* file() was removed in favor of open() in python 3. Older pythons also have open().
* Some updates where needed to handle py3k Unicode strings.
* Python 3 locals() does not work inside list comprehensions, it only gives locals within the comprehension itself.

Unicode changes may duplicate work done in PR #1281.