Change cursor shape depending on mode

Change the cursor to be a block in Normal mode and a line in Insert
mode, with a check to detect the OS since the approach must be terminal
specific.