Set numberwidth appropriately when opening large files

Previously, opening a file with >1000 lines would cause the columns to
jump around when entering/leaving insert mode because of the length
mismatch between number and relativenumber. Now it checks the
linecount when opening a file and sets the line number appropriately.