API documentation

I've rewritten the API documentation for the C library using the NaturalDocs
format. This covers the whole C library and so should give enough information
for anybody using the C++ or Python wrappers as well.