Improve Cython check

This checks that we have recent enough Cython by trying to compile code that we
need.
Cython: add the missing import
Cython: add the missing class
Merge pull request #77 from certik/cython

Improve Cython check (fixes #62)