Fix CMake toolchain

1. Use source file list instead of using GLOB patterns because they match
   *_mips.c files as well.
2. Add threads detection.
3. Remove unused big endian detection.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Update .gitignore

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
CMakeLists: Add my copyright

Signed-off-by: Timothy Gu <timothygu99@gmail.com>