Fix test.cpp compile error

On gcc 4.7 this error happens:

    test.cpp: In function 'int main(int, char**)':
    test.cpp:28:13: error: 'close' was not declared in this scope
Merge pull request #31 from Motiejus/quantal

Fix test.cpp compile error
Make `tools.md` better suited for `pandoc -t man`
Add doc/index.md -- documentation frontpage/TOC