Add support for running Kakoune with redirected stdin

Will read to a *stdin* fifo buffer
Fix word completion that replaced the whole current word

Only replace up to the cursor.