Correct completion for no-args method

Method are now completed according to their definition, i.e., if the method was
declared with parens, the completion engine inserts the empty parens.

Fix #1001766
added tests