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.