Use GoogleTest for testing

Summary:

* Support GoogleTest
* Add tests for memory.c (run_memory_tests)
* Run tests on travis-ci 

How to run test:

```
$ cd test
$ cmake .
$ make
$ ./run_{XXX}_test
```