Get rid of hardcoded HAVE_TERMIOS #define

- Use `AC_CHECK_HEADERS` to check for presence of termios.h or termio.h instead of hardcoding `HAVE_TERMIOS` in the Makefile.am.
- Add .gitignore file