Tweak docs for consistency and correctness

The grains example would traceback if the grain was not defined, so I
have replaced this example with a better one. Also made a few changes
for consistency in formatting, and made a couple terms into links to the
relevant documentation.
Merge pull request #10680 from terminalmage/docs

Tweak docs for consistency and correctness