Add support for external C++ template functions.

The syntax follows that of template classes, namely

    cdef T foo[T](T, ...)