Add memory_test.cpp
Rename "namespace" to "ref_namespace"

* Avoid to conflict with the C++ keyword
Update .travis.yml
Add run_memory_tests as executable which runs memory tests