Suggest variable names when variable matching fails

Resolves #1804 and extends work done in #1776 for #888

- Moved generic recommendation code to a new utils module
- Simplified API of generic recommendation code
- Modified 'variable not found' error messages for readability