Add the cursor feature.

Add a visible cursor bar to the expression string.
Enable following operations:
    - arrow keys can be used to move the cursor to navigate the
      expression string;
    - digits and operators can be inserted at the current cursor
      position;
    - pressing the 'Backspace' key removes the character before the
      cursor, if any;

Reorganize and reformat the code structure (rename and reorder
routines).

Clean up the code, add and update the comments.

Add 'enum direction' used to specify the direction when moving the
cursor.