Use default digest implementation in dgst.c

Use default instead of ENGINE version of digest. Without this
errors will occur if you use an ENGINE for a private key and
it doesn't implement the digest in question.
Add loaded dynamic ENGINEs to list.

Always add a dynamically loaded ENGINE to list. Otherwise it can cause
problems when multiply loaded, especially if it adds new public key methods.
For all current engines we only want a single implementation anyway.
(cherry picked from commit e933f91f50108a43c0198cdc63ecdfdbc77b4d0d)
Check i before r[i].

PR#3244
Fix demo comment: 0.9.9 never released.
(cherry picked from commit 717cc8589540b95122a652dee68e6a75b6262d93)
typo
(cherry picked from commit cb2182676bdf652070bc272a3896d957763a4324)
Clarify docs.

Remove reference to ERR_TXT_MALLOCED in the error library as that is
only used internally. Indicate that returned error data must not be
freed.
(cherry picked from commit f2d678e6e89b6508147086610e985d4e8416e867)