[sql-hint addon] Clean up, fix handling of whitespace

Closes #2761