Extract completion context and pass it to Compliment

This is a complementary pull request to clojure-emacs/cider-nrepl#50. Functions are introduced to extract completion context from the source buffer and pass it to Compliment.

Non-obvious part: on line 610 I check whether the buffer is not a cider-repl-mode buffer. This is important due to the fact that `beginning-of-defun` and `ending-of-defun` work incorrectly in a REPL buffer (probably because of `user>` text and similar). Besides, when typing into the REPL the benefit of completion context is very limited.