Add a script to find memory errors using ASan

Set up memory error check in Travis CI.