distclean: fix file permission and Windows line ending

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

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

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