Hacky way to make const cypclass behave as const in Cython but not in C++ (useful for refcount bookkeeping for example)