Isolate `nrepl-client` connection logic from CIDER

Hi Bozhidar,

I have just writen  a [nREPL client and server for R](https://github.com/vspinu/R-nREPL/tree/master/) and with this patch I can sucesfuly [connect/jack-in](https://github.com/vspinu/edamot/blob/master/edamot.el). There are a bunch of other, less critical, cider links that must be broken. I will be addressing those gradually. 

I hope you would be fine with spliting nrepl into a separte package eventually. 

Thanks.

----  

Allow `nrepl-client` to be used by non CIDER frontends.

- Frontends can control the creation of the client buffer through
  `nrepl-create-client-buffer-function`.

- Each frontend has it's own `xxx-connected-hook` which is run by
  `xxx--connected-handler`. The latter function is placed in the local
  `nrepl-connected-hook` during the client buffer initialization. Similarly for
  `xxx-disconnected-hook`.

- Rename `nrepl--init-connection-buffer` -> nrepl--init-capabilities
> This looks odd.

It is, but server needs to pass stuff to the client and there is no other way except by passing arguments explicitly, which is ugly and not scalable in case more vars will be needed in the future. This part will go away when the whole system is moved to process variables instead of buffer locals. So I would not worry about it.