Add foreach_document(), documents[] examples

Add 2 examples to the API docs.
Add some relative links.