cabalize library build and tests; add .gitignore