Use RST formatting for doc-strings used in Python API docs as well as minor corrections, also add links for foreach_get/set.