better completion popup key handling

This fixes a bug whereby movement keys would 'get stuck' by the auto-popup mechanism when no completions were actually available. We alleviate this problem by only grabbing those key events and sending them to the completion popup if it actually has completion values.