Use std::atomic to achieve thread safety
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.
Add a test for WITH_CSYMPY_THREAD_SAFE into Travis
Merge pull request #218 from certik/atomic

Use std::atomic to achieve thread safety