Keyword based autocompletion in SQL query editors

Partially solves feature request 1535.