fixing small coverity issues: 751966 Argument cannot be negative,
1111399 Explicit null dereferenced and 1111488 Uninitialized scalar variable
Prepare 3.1.12
Fix typos
Explicitly stats that the number of slaves is not necessarily 1.
Fix typo in docs.

Per Yaron Naveh.