add support for HOME & END keys

Usually (i.e., in basically all command line [and even GUI based] programs),
the HOME/POS1 key moves the cursor to the beginning of the line and the END
key can be used to move the cursor to the end of current line. Such movements
are not yet supported by clerk.
This change adds code for setting the cursor to the appropriate position when
inputting text in clerk.
Change 'buffer_size - 1' into 'text_len' and I will merge your request :)

Btw, I appreciate your numerous contributions!