Naive approach to fix memview incref/decref asymmetry in transpose

This patch contains test-case along with a blind patch that fixes the test (but
may have other consequences, someone who actually understands the code must
review it).

Original error was:
Fatal Python error: Acquisition count is 0 (line XYZ)

which was caused by refcount error when memview transposition was used on
extension class memoryview attribute.
Add casting to const

The included test is derived from a real world case
which would lead to warnings in GCC if the pointer
wouldn't be explicitly casted to const.
Allow function pointer typedefs with calling convention specified.
Fix C++ compilation error when if/else expression has extension class type.
move profiling utility code into external .c file
minor code simplification
whitespace
implement experimental support for line tracing
fix tracing check outside of functions
Merge pull request #206 from nnemkin/cpp_condexpr_cast_fix

Fix C/C++ compilation error when if/else expression has extension class type.
fix build
Consistently declare local error reporting variables (lineno, clineno, filename) for all types of functions.
In cimport_from_pyx mode don't treat "cdef extern from" variables as being defined, preventing erroneous cross-module cimport.
Merge pull request #209 from nnemkin/local_error_reporting_vars

Consistently declare local error reporting variables (lineno, clineno, filename)
Merge pull request #208 from nnemkin/cimport_from_pyx_fix

Fix extern variable cimport code in cimport_from_pyx mode
Merge pull request #207 from nnemkin/callconv_pointers_fix

Correctly handle function pointer typedefs with calling convention specified.
merge
prepare release of 0.19 beta 1
remove unused left-over code
enable Py_TPFLAGS_HAVE_VERSION_TAG on extension types by default (also in Py2) and provide 'type_version_tag' option to disable it