Print more helpful messages.

This patch adds details to the output messages to explain the cause of the
possible problems and how changing the code in a specific manner might help
optimize it. Also provides links to documentation whenever available.