Compile documentation in markdown.

Documentation in markdown format. Also fixed build.sh to honour the CC/CXX environment variables and to supply proper linker flags for diStorm.