Add WITH_CSYMPY_THREAD_SAFE option to cmake

It is off by default. If turned on, the reference counter is using std::atomic
to make it thread safe.