DOC split api.rst into several files and other doc improvements